docker-calendso/Dockerfile

36 lines
958 B
Docker
Raw Normal View History

FROM node:14 as deps
WORKDIR /app
2021-08-12 21:45:58 +00:00
COPY calendso/package.json calendso/yarn.lock ./
COPY calendso/prisma prisma
2021-08-12 20:59:11 +00:00
RUN yarn install --frozen-lockfile
FROM node:14 as builder
WORKDIR /app
2022-01-05 10:04:29 +00:00
ENV BASE_URL=https://calendso.example.com
ENV NEXT_PUBLIC_APP_URL=https://calendso.example.com
ENV DATABASE_URL=postgresql://POSTGRESQL
COPY calendso .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build && yarn install --production --ignore-scripts --prefer-offline
FROM node:14 as runner
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/prisma ./prisma
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/next.config.js ./
COPY --from=builder /app/next-i18next.config.js ./
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/package.json ./package.json
COPY scripts scripts
EXPOSE 3000
CMD ["/app/scripts/start.sh"]