-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
executable file
·57 lines (39 loc) · 1.31 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
FROM node:22-alpine as build
ENV NODE_ENV=production
ENV NEXT_PUBLIC_ADDRESSCOMPLETE_API_KEY=UR78-BU29-RU35-EP49
COPY . /src
WORKDIR /src
ARG COGNITO_APP_CLIENT_ID
ARG COGNITO_USER_POOL_ID
ARG INDEX_SITE="false"
ENV INDEX_SITE=$INDEX_SITE
ARG NEXT_SERVER_ACTIONS_ENCRYPTION_KEY
ENV NEXT_SERVER_ACTIONS_ENCRYPTION_KEY=$NEXT_SERVER_ACTIONS_ENCRYPTION_KEY
RUN corepack enable && yarn set version berry
RUN yarn workspaces focus gcforms flag_initialization
RUN yarn build
RUN yarn workspaces focus gcforms flag_initialization --production
FROM node:22-alpine as final
LABEL maintainer="-"
ENV NODE_ENV=production
ARG COGNITO_APP_CLIENT_ID
ENV COGNITO_APP_CLIENT_ID=$COGNITO_APP_CLIENT_ID
ARG COGNITO_USER_POOL_ID
ENV COGNITO_USER_POOL_ID=$COGNITO_USER_POOL_ID
ARG INDEX_SITE="false"
ENV INDEX_SITE=$INDEX_SITE
ARG NEXT_SERVER_ACTIONS_ENCRYPTION_KEY
ENV NEXT_SERVER_ACTIONS_ENCRYPTION_KEY=$NEXT_SERVER_ACTIONS_ENCRYPTION_KEY
WORKDIR /src
COPY package.json yarn.lock .yarnrc.yml next.config.mjs ./
COPY .yarn ./.yarn
# Update to latest yarn version
RUN corepack enable && yarn set version berry
COPY public ./public
COPY prisma ./prisma
COPY flag_initialization ./flag_initialization
COPY --from=build /src/node_modules ./node_modules
COPY --from=build /src/.next ./.next
ENV PORT 3000
EXPOSE 3000
ENTRYPOINT [ "yarn", "start"]