Fix angular 404

This commit is contained in:
Administrator 2022-03-17 19:33:38 +01:00
parent b0e3650757
commit 3bf24f4938
2 changed files with 36 additions and 0 deletions

View File

@ -13,6 +13,7 @@ RUN ls /usr/local/app/dist
FROM nginx:latest FROM nginx:latest
COPY --from=build /usr/local/app/dist/aktienbot /usr/share/nginx/html COPY --from=build /usr/local/app/dist/aktienbot /usr/share/nginx/html
COPY frontend/deploy/nginx.conf /etc/nginx
HEALTHCHECK --interval=15s --timeout=2s CMD ["./deploy/healthcheck.sh"] HEALTHCHECK --interval=15s --timeout=2s CMD ["./deploy/healthcheck.sh"]

View File

@ -0,0 +1,35 @@
events {
worker_connections 1024; ## Default: 1024
}
http {
## use mime types
include /etc/nginx/mime.types;
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html;
## without this our .css are not loaded
try_files $uri $uri/ /index.html?$query_string;
}
}
## enable gzip compression
gzip on;
gzip_vary on;
gzip_min_length 256;
gzip_proxied any;
gzip_types
## text/html is always compressed : https://nginx.org/en/docs/http/ngx_http_gzip_module.html
text/plain
text/css
text/javascript
application/javascript
application/x-javascript
application/xml
application/json
application/ld+json;
}