should be working now
This commit is contained in:
parent
32301a1b4e
commit
091ec0f716
2 changed files with 5 additions and 7 deletions
|
@ -11,7 +11,8 @@ RUN npm run build --prod
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
RUN rm /etc/nginx/conf.d/default.conf
|
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
|
COPY ./nginx.conf /etc/nginx/conf.d/my-angular-app.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
|
@ -2,12 +2,9 @@ server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
location / {
|
location /silly-game {
|
||||||
root /usr/share/nginx/html/browser; # This is crucial!
|
root /usr/share/nginx/html/browser;
|
||||||
index index.html index.html;
|
index index.html index.html;
|
||||||
rewrite ^/silly-game/(.*)$ /$1 break;
|
try_files $uri $uri/ /index.html;
|
||||||
try_files $uri $uri/ /index.html; # For Angular routing
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Optional: Add other configurations like gzip, headers, etc.
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue