Improved performance by enabling gzip and caching.

This commit is contained in:
Bryce Covert
2019-02-25 17:24:08 -08:00
parent 62b6316242
commit 1fa6154f39
3 changed files with 24 additions and 0 deletions

View 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;
}

View File

@@ -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"

View File

@@ -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: