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