-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
58 lines (41 loc) · 1.34 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
FROM node:16-alpine AS node
RUN chown -R 1000:1000 /home/node && \
chmod -R 755 /home/node && \
chown 1000:1000 /tmp && \
chmod 1777 /tmp && \
mkdir /app && \
chown 1000:1000 /app
WORKDIR /app
USER 1000
COPY --chown=1000:1000 . .
FROM node AS build
COPY yarn.lock .yarnrc.yml ./
COPY .yarn .yarn
ENV YARN_IGNORE_NODE=1
RUN yarn fetch --immutable
COPY . .
ARG NEXT_PUBLIC_API_URL
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
ARG NEXT_PUBLIC_MATOMO_SITE_ID
ENV NEXT_PUBLIC_MATOMO_SITE_ID=$NEXT_PUBLIC_MATOMO_SITE_ID
ARG NEXT_PUBLIC_MATOMO_URL
ENV NEXT_PUBLIC_MATOMO_URL=$NEXT_PUBLIC_MATOMO_URL
ARG NEXT_PUBLIC_MATOMO_ENABLED
ENV NEXT_PUBLIC_MATOMO_ENABLED=$NEXT_PUBLIC_MATOMO_ENABLED
ARG NEXT_PUBLIC_TEST_NUMBER_ENABLED
ENV NEXT_PUBLIC_TEST_NUMBER_ENABLED=$NEXT_PUBLIC_TEST_NUMBER_ENABLED
ARG NEXT_PUBLIC_PASTEK_CHAT_ID
ENV NEXT_PUBLIC_PASTEK_CHAT_ID=$NEXT_PUBLIC_PASTEK_CHAT_ID
ARG NEXT_PUBLIC_LANDING_PAGE_BLUES_RESOURCES
ENV NEXT_PUBLIC_LANDING_PAGE_BLUES_RESOURCES=$NEXT_PUBLIC_LANDING_PAGE_BLUES_RESOURCES
ARG NEXT_PUBLIC_CALENDLY_LINK
ENV NEXT_PUBLIC_CALENDLY_LINK=$NEXT_PUBLIC_CALENDLY_LINK
RUN yarn build
RUN yarn workspaces focus --production && yarn cache clean
FROM node AS server
COPY --from=build /app /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV NEXT_TELEMETRY_DEBUG=0
ENV YARN_IGNORE_NODE=1
CMD ["yarn", "start"]