flame/.docker/Dockerfile

31 lines
446 B
Text
Raw Normal View History

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