diff --git a/Dockerfile b/Dockerfile index cb13b00..be60547 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get update && apt-get install -y \ git clone https://github.com/svenvandescheur/svenv.nl.git /srv/nginx && \ cd /srv/nginx && \ + npm install --production && \ pip install -r requirements.txt && \ cd /srv/nginx/svenv/ && \ diff --git a/files/etc/nginx/conf.d/default.conf b/files/etc/nginx/conf.d/default.conf index b29a45f..d9e2817 100644 --- a/files/etc/nginx/conf.d/default.conf +++ b/files/etc/nginx/conf.d/default.conf @@ -38,8 +38,16 @@ server { ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; ssl_dhparam /etc/ssl/certs/dhparams.pem; - location /jspm_packages { - root /srv/nginx/; + location /humans.txt { + root /srv/nginx/svenv/; + + expires 30d; + add_header Pragma public; + add_header Cache-Control "public"; + } + + location /robots.txt { + root /srv/nginx/svenv/; expires 30d; add_header Pragma public; @@ -62,6 +70,14 @@ server { add_header Cache-Control "public"; } + location /node_modules { + root /srv/nginx/svenv/; + + expires 30d; + add_header Pragma public; + add_header Cache-Control "public"; + } + location / { uwsgi_pass django; uwsgi_param QUERY_STRING $query_string;