2021-06-14 13:13:38 +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-14 13:13:38 +03:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY package*.json ./
|
|
|
|
|
|
|
|
RUN apk --no-cache --virtual build-dependencies add python make g++ \
|
|
|
|
&& npm install --production
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2021-06-24 13:53:45 +03:00
|
|
|
RUN mkdir -p ./public ./data \
|
2021-06-14 13:13:38 +03:00
|
|
|
&& cd ./client \
|
2021-06-23 15:15:14 +03:00
|
|
|
&& npm install --production \
|
2021-06-14 13:13:38 +03:00
|
|
|
&& npm run build \
|
|
|
|
&& cd .. \
|
|
|
|
&& mv ./client/build/* ./public \
|
|
|
|
&& rm -rf ./client \
|
|
|
|
&& apk del build-dependencies
|
|
|
|
|
|
|
|
EXPOSE 5005
|
|
|
|
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
|
|
|
|
CMD ["node", "server.js"]
|