2022-09-11 14:35:49 +00:00
|
|
|
# This dockerfile than builds the production dependencies and the final image
|
|
|
|
|
|
|
|
# Always fetch amd64 image
|
2023-03-15 13:24:26 +00:00
|
|
|
FROM ghcr.io/caramelfur/picsur-alpha-stage1:latest AS BUILDER_STAGE1
|
2022-09-11 14:35:49 +00:00
|
|
|
|
2023-06-15 11:24:34 +00:00
|
|
|
FROM node:20-alpine AS BUILDER_STAGE2
|
2022-09-11 14:35:49 +00:00
|
|
|
|
|
|
|
RUN apk add python3 build-base
|
|
|
|
|
|
|
|
WORKDIR /picsur
|
|
|
|
COPY --from=BUILDER_STAGE1 /picsur ./
|
|
|
|
|
|
|
|
RUN yarn workspaces focus -A --production
|
|
|
|
|
2023-06-15 11:24:34 +00:00
|
|
|
FROM node:20-alpine
|
2022-09-11 14:35:49 +00:00
|
|
|
|
|
|
|
ENV PICSUR_PRODUCTION=true
|
|
|
|
|
|
|
|
WORKDIR /picsur
|
|
|
|
COPY --from=BUILDER_STAGE2 /picsur ./
|
|
|
|
|
|
|
|
CMD yarn workspace picsur-backend start:prod
|