diff --git a/data/etc/nginx/vhost.d/default_location b/data/etc/nginx/vhost.d/default_location new file mode 100644 index 00000000..74ecce2b --- /dev/null +++ b/data/etc/nginx/vhost.d/default_location @@ -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; +} + diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 01797ef8..de624feb 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -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" diff --git a/docker-compose.yml b/docker-compose.yml index 5ac8b4dc..bb621e7e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: