Improved performance by enabling gzip and caching.
This commit is contained in:
12
data/etc/nginx/vhost.d/default_location
Normal file
12
data/etc/nginx/vhost.d/default_location
Normal file
@@ -0,0 +1,12 @@
|
||||
location ~* \.(png|jpg|jpeg|gif|ico)$ {
|
||||
expires 2d;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
proxy_pass http://local.app.integreatconsult.com;
|
||||
}
|
||||
|
||||
location ~* \.(js|css)$ {
|
||||
expires 15m;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
proxy_pass http://local.app.integreatconsult.com;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
version: '3'
|
||||
services:
|
||||
nginx-proxy:
|
||||
restart: "always"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
labels:
|
||||
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true
|
||||
volumes:
|
||||
# - ./data/var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ./data/opt/integreat/dev/usr/share/nginx/html:/usr/share/nginx/html
|
||||
database:
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
@@ -9,6 +9,7 @@ services:
|
||||
- ./data/certs/:/etc/nginx/certs:ro
|
||||
- ./data/etc/nginx/vhost.d:/etc/nginx/vhost.d
|
||||
- ./data/usr/share/nginx/html:/usr/share/nginx/html
|
||||
- ./data/etc/nginx/conf.d:/etc/nginx/conf.d
|
||||
letsencrypt:
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion:stable
|
||||
volumes:
|
||||
@@ -25,6 +26,7 @@ services:
|
||||
environment:
|
||||
config: /usr/local/config/local.edn
|
||||
VIRTUAL_HOST: local.app.integreatconsult.com
|
||||
VIRTUAL_PORT: 3000
|
||||
database:
|
||||
image: postgres:9-alpine
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user