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/ {