metropolis/Dockerfile

33 lines
546 B
Docker
Raw Normal View History

2021-07-08 19:40:14 +02:00
FROM node:16-alpine AS build
WORKDIR /app
COPY package.json .
COPY yarn.lock .
RUN yarn install --frozen-lockfile
COPY tsconfig.json .
COPY tsconfig.build.json .
2021-07-29 02:25:33 +02:00
COPY webpack.config.js .
COPY gql-codegen.yml .
COPY scripts scripts
2021-07-24 16:15:07 +02:00
COPY migration migration
2021-07-29 02:25:33 +02:00
COPY frontend frontend
2021-07-24 16:15:07 +02:00
COPY src src
2021-07-08 19:40:14 +02:00
RUN yarn build
FROM node:16-alpine AS prod
WORKDIR /app
ENV NODE_ENV production
COPY package.json .
COPY yarn.lock .
RUN yarn install --production --frozen-lockfile
COPY ormconfig.js .
2021-07-08 19:40:14 +02:00
COPY --from=build /app/dist dist
CMD ["yarn", "start:prod"]