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

23 lines
402 B
Docker
Raw Permalink Normal View History

2019-02-07 16:03:20 +00:00
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" ]
2019-05-28 09:06:57 +00:00
FROM node:lts AS prod
2019-02-07 16:03:20 +00:00
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" ]