flame/.docker/Dockerfile

30 lines
418 B
Docker
Raw Normal View History

2021-11-08 17:42:32 +03:00
FROM node:14 as builder
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
RUN mkdir -p ./public ./data \
&& cd ./client \
2021-06-23 05:54:24 +03:00
&& npm install --production \
&& npm run build \
&& cd .. \
&& mv ./client/build/* ./public \
&& rm -rf ./client
2021-11-01 17:13:06 +03:00
FROM node:14-alpine
COPY --from=builder /app /app
WORKDIR /app
EXPOSE 5005
ENV NODE_ENV=production
2021-06-23 05:54:24 +03:00
CMD ["node", "server.js"]