mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 10:45:27 +00:00
18 lines
473 B
Docker
18 lines
473 B
Docker
FROM node:16 as build
|
|
WORKDIR /build/app
|
|
COPY api/package.json api/yarn.lock api/.yarnrc.yml ./
|
|
COPY api/.yarn ./.yarn
|
|
COPY lib ../lib
|
|
RUN yarn install --immutable
|
|
COPY ./api .
|
|
RUN yarn build
|
|
|
|
FROM node:16 as prod
|
|
WORKDIR /app/api
|
|
COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./
|
|
COPY --from=build /build/app/.yarn ./.yarn
|
|
COPY --from=build /build/app/dist ./dist
|
|
COPY ./lib ../lib
|
|
RUN yarn install --immutable
|
|
CMD ["yarn", "start"]
|