Dockerfile and nginx conf file for serving static built files

This commit is contained in:
2023-07-29 13:43:26 +02:00
parent d47e537b1d
commit b16a1f5f1c
2 changed files with 41 additions and 0 deletions

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM node:current-alpine3.17 as builder
WORKDIR /app
COPY package*.json .
COPY *config* .
COPY .env .
COPY src/ src
COPY static/ static
RUN npm install
RUN npm run build
FROM nginx:alpine
WORKDIR /app
COPY --from=builder /app/build .
COPY ./nginx.conf /etc/nginx/nginx.conf