working nginx setup

This commit is contained in:
Thilo Behnke
2022-06-12 19:32:34 +02:00
parent 6db3432794
commit b6a88ecb60
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -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
+3 -4
View File
@@ -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/ {