-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
80 lines (53 loc) · 1.63 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
FROM node:20-slim AS build
RUN apt-get update
RUN apt-get install -y ca-certificates
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /app
ARG GITHUB_TOKEN
ENV GITHUB_TOKEN $GITHUB_TOKEN
COPY ./pnpm-lock.yaml /app
RUN pnpm fetch
COPY ./design-system/pnpm-lock.yaml /app/design-system/pnpm-lock.yaml
RUN cd design-system && pnpm fetch
COPY . .
RUN pnpm install --offline --frozen-lockfile
RUN cd design-system && pnpm install --prefer-offline --frozen-lockfile
ARG ENVIRONMENT
ENV VITE_ENVIRONMENT $ENVIRONMENT
ARG KOYEB_GIT_SHA
ARG APP_VERSION
ENV VITE_APP_VERSION ${KOYEB_GIT_SHA:-${APP_VERSION}}
ARG API_URL
ENV VITE_API_URL $API_URL
ARG AI_ASSISTANT_API_URL
ENV VITE_AI_ASSISTANT_API_URL $AI_ASSISTANT_API_URL
ARG WEBSITE_URL
ENV VITE_WEBSITE_URL $WEBSITE_URL
ARG PAGE_CONTEXT_BASE_URL
ENV VITE_PAGE_CONTEXT_BASE_URL $PAGE_CONTEXT_BASE_URL
ARG IDENFY_SERVICE_BASE_URL
ENV VITE_IDENFY_SERVICE_BASE_URL $IDENFY_SERVICE_BASE_URL
ARG RECAPTCHA_CLIENT_KEY
ENV VITE_RECAPTCHA_CLIENT_KEY $RECAPTCHA_CLIENT_KEY
ARG POSTHOG_API_HOST
ENV VITE_POSTHOG_API_HOST $POSTHOG_API_HOST
ARG POSTHOG_KEY
ENV VITE_POSTHOG_KEY $POSTHOG_KEY
ARG STRIPE_PUBLIC_KEY
ENV VITE_STRIPE_PUBLIC_KEY $STRIPE_PUBLIC_KEY
ARG IDENFY_SERVICE_BASE_URL
ENV VITE_IDENFY_SERVICE_BASE_URL $IDENFY_SERVICE_BASE_URL
ARG MAPBOX_TOKEN
ENV VITE_MAPBOX_TOKEN $MAPBOX_TOKEN
ARG INTERCOM_APP_ID
ENV VITE_INTERCOM_APP_ID $INTERCOM_APP_ID
ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN $SENTRY_AUTH_TOKEN
RUN pnpm run build
FROM nginx:latest
RUN apt-get update
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 3000
COPY nginx.conf /etc/nginx/conf.d/default.conf