diff --git a/Dockerfile b/Dockerfile index 84698c517..6c81357c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,7 @@ RUN npm run build FROM nginx:stable-alpine AS production COPY --from=builder /usr/src/app/dist /usr/share/nginx/html +COPY ./default.conf /etc/nginx/conf.d/default.conf # Expose the default port for the Nginx web server EXPOSE 80 diff --git a/default.conf b/default.conf new file mode 100644 index 000000000..171ca3cb4 --- /dev/null +++ b/default.conf @@ -0,0 +1,15 @@ +server { + listen 80; + listen [::]:80; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +}