should be working now

This commit is contained in:
miwr 2025-04-16 15:17:36 +02:00
parent 32301a1b4e
commit 091ec0f716
2 changed files with 5 additions and 7 deletions

View file

@ -11,7 +11,8 @@ RUN npm run build --prod
FROM nginx:alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist/silly-game-frontend /usr/share/nginx/html
COPY --from=builder /app/dist/silly-game-frontend/browser /usr/share/nginx/html/browser/silly-game
COPY --from=builder /app/dist/silly-game-frontend/3rdpartylicenses.txt /usr/share/nginx/html/3rdpartylicenses.txt
COPY ./nginx.conf /etc/nginx/conf.d/my-angular-app.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View file

@ -2,12 +2,9 @@ server {
listen 80;
server_name _;
location / {
root /usr/share/nginx/html/browser; # This is crucial!
location /silly-game {
root /usr/share/nginx/html/browser;
index index.html index.html;
rewrite ^/silly-game/(.*)$ /$1 break;
try_files $uri $uri/ /index.html; # For Angular routing
try_files $uri $uri/ /index.html;
}
# Optional: Add other configurations like gzip, headers, etc.
}