This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
node-fftcg/backend/Dockerfile

22 lines
402 B
Docker

FROM node:lts AS dev
ENV NODE_ENV development
# some dir for our code
WORKDIR /app
# mount code
VOLUME ["/app"]
# this is how we start
CMD [ "yarn", "dev" ]
FROM node:lts AS prod
ENV NODE_ENV production
# some dir for our code
WORKDIR /app
# install dependencies
COPY package*.json yarn*.lock ./
RUN yarn --production
# copy code
COPY . .
USER node
# this is how we start
CMD [ "yarn", "start" ]