2021-11-19 15:57:57 +00:00
|
|
|
FROM node:14 as deps
|
2021-08-12 20:54:41 +00:00
|
|
|
|
2021-07-02 23:12:08 +00:00
|
|
|
WORKDIR /app
|
2021-08-12 21:45:58 +00:00
|
|
|
COPY calendso/package.json calendso/yarn.lock ./
|
2021-07-02 23:12:08 +00:00
|
|
|
COPY calendso/prisma prisma
|
2021-08-12 20:59:11 +00:00
|
|
|
RUN yarn install --frozen-lockfile
|
2021-07-02 23:12:08 +00:00
|
|
|
|
2021-11-19 15:57:57 +00:00
|
|
|
FROM node:14 as builder
|
|
|
|
|
2021-07-02 23:12:08 +00:00
|
|
|
WORKDIR /app
|
2022-01-05 09:24:41 +00:00
|
|
|
ENV BASE_URL=APP_BASE_URL_VAR
|
|
|
|
ENV NEXT_PUBLIC_APP_URL=APP_NEXT_PUBLIC_APP_URL_VAR
|
2021-11-19 15:57:57 +00:00
|
|
|
|
2021-07-02 23:12:08 +00:00
|
|
|
COPY calendso .
|
2021-11-19 15:57:57 +00:00
|
|
|
|
2021-07-02 23:12:08 +00:00
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
2021-08-12 20:54:41 +00:00
|
|
|
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
|
2021-07-02 23:12:08 +00:00
|
|
|
|
2021-11-19 15:57:57 +00:00
|
|
|
FROM node:14 as runner
|
2021-07-02 23:12:08 +00:00
|
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV production
|
|
|
|
|
2021-11-19 15:57:57 +00:00
|
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
|
|
COPY --from=builder /app/prisma ./prisma
|
|
|
|
COPY --from=builder /app/scripts ./scripts
|
2021-08-12 20:54:41 +00:00
|
|
|
COPY --from=builder /app/next.config.js ./
|
2021-10-16 17:09:57 +00:00
|
|
|
COPY --from=builder /app/next-i18next.config.js ./
|
2021-07-02 23:12:08 +00:00
|
|
|
COPY --from=builder /app/public ./public
|
|
|
|
COPY --from=builder /app/.next ./.next
|
|
|
|
COPY --from=builder /app/package.json ./package.json
|
2022-01-05 09:24:41 +00:00
|
|
|
COPY scripts scripts
|
2021-11-19 15:57:57 +00:00
|
|
|
|
2021-07-02 23:12:08 +00:00
|
|
|
EXPOSE 3000
|
2021-08-12 20:54:41 +00:00
|
|
|
CMD ["/app/scripts/start.sh"]
|