2020-10-17 15:55:18 +02:00
|
|
|
FROM node:14-slim as builder
|
|
|
|
|
2021-03-06 23:54:18 +02:00
|
|
|
RUN apt-get -qy update && apt-get -qy install openssl
|
|
|
|
|
2020-10-17 15:55:18 +02:00
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
COPY package.json .
|
|
|
|
COPY yarn.lock .
|
2021-03-06 23:54:18 +02:00
|
|
|
COPY yalc.lock .
|
|
|
|
COPY .yalc ./.yalc/
|
2020-10-17 15:55:18 +02:00
|
|
|
|
|
|
|
RUN yarn
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2021-03-06 23:54:18 +02:00
|
|
|
RUN yarn run db-gen
|
2020-10-17 15:55:18 +02:00
|
|
|
RUN yarn nx build blueprints
|
|
|
|
|
|
|
|
FROM node:14-slim
|
|
|
|
|
2021-03-06 23:54:18 +02:00
|
|
|
RUN apt-get -qy update && apt-get -qy install openssl
|
|
|
|
|
2020-10-17 15:55:18 +02:00
|
|
|
WORKDIR /usr/src/app
|
2020-10-22 15:53:06 +02:00
|
|
|
|
2020-10-17 15:55:18 +02:00
|
|
|
COPY apps/blueprints/prod.package.json ./package.json
|
|
|
|
COPY yarn.lock .
|
2021-03-06 23:54:18 +02:00
|
|
|
COPY yalc.lock .
|
|
|
|
COPY .yalc ./.yalc/
|
2020-10-17 15:55:18 +02:00
|
|
|
|
|
|
|
RUN yarn install --production
|
|
|
|
|
2021-03-06 23:54:18 +02:00
|
|
|
COPY --from=builder /usr/src/app/node_modules/.prisma ./node_modules/.prisma/
|
2020-10-17 15:55:18 +02:00
|
|
|
COPY --from=builder /usr/src/app/dist/apps/blueprints .
|
|
|
|
|
|
|
|
CMD ["yarn", "next", "start"]
|