diff --git a/config/nginx/nginx.conf b/config/nginx/nginx.conf index ba54f50..e858187 100644 --- a/config/nginx/nginx.conf +++ b/config/nginx/nginx.conf @@ -22,10 +22,22 @@ http { tcp_nopush on; server_names_hash_bucket_size 128; # this seems to be required for some vhosts + gzip on; + gzip_types text/plain application/json application/x-json application/javascript application/x-javascript text/css text/x-css; + gzip_min_length 1024; + gzip_static on; + server { listen 80; location / { proxy_pass http://server; } + location /static { + root /var/www; + gzip_static on; + } + location /announce.json/ { + root /var/www; + } } } \ No newline at end of file diff --git a/docker-compose.dev b/docker-compose.dev index c543023..390fe27 100644 --- a/docker-compose.dev +++ b/docker-compose.dev @@ -28,6 +28,7 @@ services: - homepage volumes: - './config/nginx:/etc/nginx' + - './public:/var/www:ro' db: image: postgres:alpine ports: diff --git a/docker-compose.prod b/docker-compose.prod index b6fa1c6..437dc67 100644 --- a/docker-compose.prod +++ b/docker-compose.prod @@ -25,6 +25,7 @@ services: - homepage volumes: - './config/nginx:/etc/nginx' + - './public:/var/www:ro' db: restart: always image: postgres:alpine