serve static files over nginx
This commit is contained in:
parent
9c0bfe1f42
commit
735b55904f
|
@ -22,10 +22,22 @@ http {
|
||||||
tcp_nopush on;
|
tcp_nopush on;
|
||||||
server_names_hash_bucket_size 128; # this seems to be required for some vhosts
|
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 {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://server;
|
proxy_pass http://server;
|
||||||
}
|
}
|
||||||
|
location /static {
|
||||||
|
root /var/www;
|
||||||
|
gzip_static on;
|
||||||
|
}
|
||||||
|
location /announce.json/ {
|
||||||
|
root /var/www;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -28,6 +28,7 @@ services:
|
||||||
- homepage
|
- homepage
|
||||||
volumes:
|
volumes:
|
||||||
- './config/nginx:/etc/nginx'
|
- './config/nginx:/etc/nginx'
|
||||||
|
- './public:/var/www:ro'
|
||||||
db:
|
db:
|
||||||
image: postgres:alpine
|
image: postgres:alpine
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -25,6 +25,7 @@ services:
|
||||||
- homepage
|
- homepage
|
||||||
volumes:
|
volumes:
|
||||||
- './config/nginx:/etc/nginx'
|
- './config/nginx:/etc/nginx'
|
||||||
|
- './public:/var/www:ro'
|
||||||
db:
|
db:
|
||||||
restart: always
|
restart: always
|
||||||
image: postgres:alpine
|
image: postgres:alpine
|
||||||
|
|
Loading…
Reference in New Issue