serve static files over nginx
This commit is contained in:
parent
9c0bfe1f42
commit
735b55904f
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,6 +28,7 @@ services:
|
|||
- homepage
|
||||
volumes:
|
||||
- './config/nginx:/etc/nginx'
|
||||
- './public:/var/www:ro'
|
||||
db:
|
||||
image: postgres:alpine
|
||||
ports:
|
||||
|
|
|
@ -25,6 +25,7 @@ services:
|
|||
- homepage
|
||||
volumes:
|
||||
- './config/nginx:/etc/nginx'
|
||||
- './public:/var/www:ro'
|
||||
db:
|
||||
restart: always
|
||||
image: postgres:alpine
|
||||
|
|
Loading…
Reference in New Issue