1
0
mirror of https://github.com/barthuijgen/factorio-sites.git synced 2024-11-28 09:33:51 +02:00
factorio-sites/blueprints.Dockerfile

35 lines
688 B
Docker

FROM node:14-slim as builder
RUN apt-get -qy update && apt-get -qy install openssl
WORKDIR /usr/src/app
COPY package.json .
COPY yarn.lock .
COPY yalc.lock .
COPY .yalc ./.yalc/
RUN yarn
COPY . .
RUN yarn run db-gen
RUN yarn nx build blueprints --prod
FROM node:14-slim
RUN apt-get -qy update && apt-get -qy install openssl
WORKDIR /usr/src/app
COPY --from=builder /usr/src/app/dist/apps/blueprints/package.json ./package.json
COPY yarn.lock .
COPY yalc.lock .
COPY .yalc ./.yalc/
RUN yarn install --production
COPY --from=builder /usr/src/app/node_modules/.prisma ./node_modules/.prisma/
COPY --from=builder /usr/src/app/dist/apps/blueprints .
CMD ["yarn", "next", "start"]