namesny-com/Dockerfile

19 lines
445 B
Docker
Raw Normal View History

2019-11-02 16:58:41 +00:00
# Stage 1 - build app
FROM node:12 as build-deps
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
2019-04-06 18:22:46 +00:00
RUN yarn
2019-11-02 16:58:41 +00:00
COPY . ./
2019-04-06 18:22:46 +00:00
RUN yarn build
2019-11-02 16:58:41 +00:00
# Stage 2 - run
FROM node:12-alpine
WORKDIR /app
COPY --from=build-deps /usr/src/app/build /app/build
COPY --from=build-deps /usr/src/app/public /app/public
COPY --from=build-deps /usr/src/app/node_modules /app/node_modules
2019-11-02 10:45:59 +00:00
VOLUME /app/config
VOLUME /app/content
2019-04-06 18:22:46 +00:00
EXPOSE 3000
2019-11-02 16:58:41 +00:00
CMD [ "node", "build/server.js" ]