From b6a88ecb6095197f45a369c379a6fda7984989c1 Mon Sep 17 00:00:00 2001 From: Thilo Behnke Date: Sun, 12 Jun 2022 19:32:34 +0200 Subject: [PATCH] working nginx setup --- client/Dockerfile | 2 +- client/nginx/default.conf | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/Dockerfile b/client/Dockerfile index 2e3d08d..e4c393b 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -27,7 +27,7 @@ RUN npm run build FROM nginx:latest -COPY --from=www_build_stage /build/www/dist/ /usr/share/pong/ +COPY --from=www_build_stage /build/www/dist/ /usr/share/nginx/pong/web COPY ./client/nginx/default.conf /etc/nginx/conf.d/default.conf COPY ./client/nginx/nginx.conf /etc/nginx/nginx.conf diff --git a/client/nginx/default.conf b/client/nginx/default.conf index 832e180..c3b0a86 100644 --- a/client/nginx/default.conf +++ b/client/nginx/default.conf @@ -2,15 +2,14 @@ server { listen 80; listen [::]:80; - root /usr/share/pong; + root /usr/share/nginx; location = / { return 301 /pong/web; } - location /pong/web { - # TODO: Why is this not used? - try_files $uri /index.html; + location /pong/web/ { + try_files $uri $uri/ /index.html; } location /pong/api/ {