mirror of
https://github.com/pawelmalak/flame.git
synced 2024-12-19 08:02:16 +03:00
27 lines
514 B
Docker
27 lines
514 B
Docker
FROM node:14-alpine
|
|
|
|
RUN apk update && apk add --no-cache nano
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN apk --no-cache --virtual build-dependencies add python make g++ \
|
|
&& npm install --production
|
|
|
|
COPY . .
|
|
|
|
RUN mkdir -p ./public ./data ./data/uploads \
|
|
&& cd ./client \
|
|
&& npm install --production \
|
|
&& 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"] |