2021-12-02 14:18:09 +01:00
|
|
|
FROM node:16-alpine3.11 as builder
|
2021-06-22 13:07:32 +02:00
|
|
|
|
2021-06-14 12:13:38 +02:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY package*.json ./
|
|
|
|
|
2021-12-02 16:43:13 +01:00
|
|
|
RUN apk --no-cache --virtual build-dependencies add python python3 make g++ \
|
2021-11-13 12:03:35 +01:00
|
|
|
&& npm install --production
|
2021-06-14 12:13:38 +02:00
|
|
|
|
2021-11-08 15:42:32 +01:00
|
|
|
COPY . .
|
2021-06-14 12:13:38 +02:00
|
|
|
|
2021-06-24 12:53:45 +02:00
|
|
|
RUN mkdir -p ./public ./data \
|
2021-06-14 12:13:38 +02:00
|
|
|
&& cd ./client \
|
2021-06-23 14:15:14 +02:00
|
|
|
&& npm install --production \
|
2021-06-14 12:13:38 +02:00
|
|
|
&& npm run build \
|
|
|
|
&& cd .. \
|
|
|
|
&& mv ./client/build/* ./public \
|
2021-11-08 15:42:32 +01:00
|
|
|
&& rm -rf ./client
|
2021-06-14 12:13:38 +02:00
|
|
|
|
2021-12-02 14:18:09 +01:00
|
|
|
FROM node:16-alpine3.11
|
2021-11-01 15:13:06 +01:00
|
|
|
|
|
|
|
COPY --from=builder /app /app
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
2021-06-14 12:13:38 +02:00
|
|
|
EXPOSE 5005
|
|
|
|
|
|
|
|
ENV NODE_ENV=production
|
2021-11-13 23:25:50 +01:00
|
|
|
ENV PASSWORD=flame_password
|
2021-06-14 12:13:38 +02:00
|
|
|
|
2022-02-17 19:27:40 +01:00
|
|
|
CMD ["sh", "-c", "chown -R node /app/data && node server.js"]
|