Fix angular 404
This commit is contained in:
parent
b0e3650757
commit
3bf24f4938
@ -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"]
|
||||||
|
|
||||||
|
35
frontend/deploy/nginx.conf
Normal file
35
frontend/deploy/nginx.conf
Normal 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user