2021-06-07 14:40:51 +03:00
|
|
|
FROM node:14-alpine
|
|
|
|
|
2021-07-28 13:52:30 +03:00
|
|
|
RUN apk update && apk add --no-cache nano curl
|
2021-06-22 14:07:32 +03:00
|
|
|
|
2021-06-07 14:40:51 +03:00
|
|
|
WORKDIR /app
|
|
|
|
|
2021-06-09 23:26:39 +03:00
|
|
|
COPY package*.json ./
|
2021-06-07 14:40:51 +03:00
|
|
|
|
2021-06-09 23:26:39 +03:00
|
|
|
RUN npm install --production
|
2021-06-07 14:40:51 +03:00
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2021-06-08 13:51:50 +03:00
|
|
|
RUN mkdir -p ./public ./data \
|
|
|
|
&& cd ./client \
|
2021-06-23 05:54:24 +03:00
|
|
|
&& npm install --production \
|
2021-06-08 13:51:50 +03:00
|
|
|
&& npm run build \
|
|
|
|
&& cd .. \
|
|
|
|
&& mv ./client/build/* ./public \
|
|
|
|
&& rm -rf ./client
|
2021-06-07 14:40:51 +03:00
|
|
|
|
|
|
|
EXPOSE 5005
|
|
|
|
|
2021-06-08 13:51:50 +03:00
|
|
|
ENV NODE_ENV=production
|
|
|
|
|
2021-06-23 05:54:24 +03:00
|
|
|
CMD ["node", "server.js"]
|