diff --git a/compose/web.yml b/compose/web.yml index 550f1960..a3857300 100644 --- a/compose/web.yml +++ b/compose/web.yml @@ -11,6 +11,7 @@ services: - 443:443 - 443:443/udp volumes: + - ../public:/app/public - ../scripts/nginx-conf/api.smartcitizen.me.conf:/etc/nginx/conf.d/api.smartcitizen.me.conf - ../scripts/nginx.conf:/etc/nginx/nginx.conf - ../scripts/certs:/etc/ssl:ro diff --git a/scripts/nginx-conf/api.smartcitizen.me.conf b/scripts/nginx-conf/api.smartcitizen.me.conf index 88962260..355627d8 100644 --- a/scripts/nginx-conf/api.smartcitizen.me.conf +++ b/scripts/nginx-conf/api.smartcitizen.me.conf @@ -59,6 +59,13 @@ server { listen [::]:443 ssl; ssl_certificate /etc/ssl/star_smartcitizen_me.pem; ssl_certificate_key /etc/ssl/star_smartcitizen_me.key; + root /app/public; + + location ~* ^/assets { + expires max; + add_header Cache-Control public; + break; + } try_files $uri/index.html $uri @app;