1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-08-05 10:55:17 +02:00

Dockerfile changes

This commit is contained in:
Paweł Malak 2021-11-13 12:03:35 +01:00
parent 08afaece2e
commit b4eb35c591
4 changed files with 16 additions and 5 deletions

View file

@ -0,0 +1,30 @@
FROM node:14-alpine3.11 as builder
WORKDIR /app
COPY package*.json ./
RUN apk --no-cache --virtual build-dependencies add python make g++ \
&& npm install --production
COPY . .
RUN mkdir -p ./public ./data \
&& cd ./client \
&& npm install --production \
&& npm run build \
&& cd .. \
&& mv ./client/build/* ./public \
&& rm -rf ./client
FROM node:14-alpine3.11
COPY --from=builder /app /app
WORKDIR /app
EXPOSE 5005
ENV NODE_ENV=production
CMD ["node", "server.js"]