Compare commits
No commits in common. "c7ae50cf83c1c5bb994f832fea99ae96b8bb6a92" and "ec30c52c5e05a4adfecf27ddc60bf47e37d9d7dd" have entirely different histories.
c7ae50cf83
...
ec30c52c5e
2 changed files with 7 additions and 5 deletions
|
@ -11,8 +11,7 @@ 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/browser /usr/share/nginx/html/browser/silly-game
|
COPY --from=builder /app/dist/silly-game-frontend /usr/share/nginx/html
|
||||||
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,9 +2,12 @@ server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
location /silly-game {
|
location / {
|
||||||
root /usr/share/nginx/html/browser;
|
root /usr/share/nginx/html/browser; # This is crucial!
|
||||||
index index.html index.html;
|
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.
|
||||||
}
|
}
|
Loading…
Reference in a new issue