rewrite ^/silly-game/(.*)$ /$1 break;
All checks were successful
ci / build (push) Successful in 1m19s

This commit is contained in:
miwr 2025-04-16 15:01:25 +02:00
parent e2b5470b3a
commit 32301a1b4e
4 changed files with 5 additions and 12 deletions

View file

@ -39,8 +39,8 @@
"build": {
"builder": "@angular-devkit/build-angular:application",
"options": {
"baseHref": "/silly-game/test",
"deployUrl": "/silly-game/test",
"baseHref": "/silly-game/",
"deployUrl": "/silly-game/",
"outputPath": "dist/silly-game-frontend",
"index": "src/index.html",
"browser": "src/main.ts",

View file

@ -18,14 +18,6 @@ spec:
image: forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/devfw-cicd/michals-silly-game-frontend:latest
ports:
- containerPort: 80
# volumeMounts:
# - name: config-volume
# mountPath: /app/src/environments/environment.ts
# subPath: environment.ts
# volumes:
# - name: config-volume
# configMap:
# name: silly-game-config
---

View file

@ -1,10 +1,11 @@
server {
listen 80;
# server_name localhost;
server_name _;
location / {
root /usr/share/nginx/html/browser; # This is crucial!
index index.html index.html;
rewrite ^/silly-game/(.*)$ /$1 break;
try_files $uri $uri/ /index.html; # For Angular routing
}

View file

@ -4,7 +4,7 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --base-href /silly-game/test --deploy-url /silly-game/test",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "ng lint"