-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
13,914 additions
and
12,953 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,21 @@ | ||
FROM node:18 as base | ||
FROM node:18-slim AS base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
RUN corepack enable | ||
COPY . /app | ||
WORKDIR /app | ||
|
||
ARG NODE_ENV | ||
ARG HCAPTCHA_SITE_KEY | ||
FROM base AS prod-deps | ||
RUN pnpm install --prod --frozen-lockfile | ||
|
||
ENV NODE_ENV=${NODE_ENV} | ||
ENV HCAPTCHA_SITE_KEY=${HCAPTCHA_SITE_KEY} | ||
FROM base AS build | ||
RUN pnpm install --prod false --frozen-lockfile | ||
RUN pnpm run build | ||
|
||
FROM base as builder | ||
|
||
WORKDIR /home/node | ||
COPY package*.json ./ | ||
|
||
COPY . . | ||
RUN yarn install | ||
RUN yarn build | ||
|
||
FROM base as runtime | ||
|
||
ENV NODE_ENV=production | ||
|
||
WORKDIR /home/node | ||
COPY package*.json ./ | ||
|
||
RUN yarn install --production | ||
COPY --from=builder /home/node/dist ./dist | ||
COPY --from=builder /home/node/build ./build | ||
COPY --from=builder /home/node/public ./public | ||
FROM base | ||
COPY --from=prod-deps /app/node_modules /app/node_modules | ||
COPY --from=build /app/dist /app/dist | ||
COPY --from=build /app/build /app/build | ||
|
||
EXPOSE 3000 | ||
|
||
CMD ["yarn", "start"] | ||
CMD [ "pnpm", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.