diff --git a/angular.json b/angular.json index 684d584..9f064fe 100644 --- a/angular.json +++ b/angular.json @@ -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", diff --git a/k8/deployment.yaml b/k8/deployment.yaml index 1b65a5e..7471179 100644 --- a/k8/deployment.yaml +++ b/k8/deployment.yaml @@ -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 --- diff --git a/nginx.conf b/nginx.conf index a4993f9..56602a8 100644 --- a/nginx.conf +++ b/nginx.conf @@ -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 } diff --git a/package.json b/package.json index 8b86de1..f8895f6 100644 --- a/package.json +++ b/package.json @@ -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"