deploy calendso using docker-compose

Signed-off-by: Ramiro Berrelleza <rberrelleza@gmail.com>
This commit is contained in:
Ramiro Berrelleza
2021-07-02 16:12:08 -07:00
parent 5061939dc8
commit 04d9936e65
6 changed files with 289 additions and 4 deletions

25
Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM node:14-alpine as deps
WORKDIR /app
COPY calendso/package.json .
COPY calendso/prisma prisma
RUN yarn install --frozen
FROM node:14-alpine as builder
WORKDIR /app
COPY calendso .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build
RUN yarn install --production --ignore-scripts --prefer-offline
FROM node:14-alpine as runner
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/prisma ./prisma
COPY scripts scripts
EXPOSE 3000
CMD ["/app/scripts/start.sh"]