Compare commits

..

No commits in common. "c7ae50cf83c1c5bb994f832fea99ae96b8bb6a92" and "ec30c52c5e05a4adfecf27ddc60bf47e37d9d7dd" have entirely different histories.

2 changed files with 7 additions and 5 deletions

View file

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

View file

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