Separate reverse proxy from compose
This commit is contained in:
parent
4a27b6d89d
commit
3719b355f7
3 changed files with 21 additions and 66 deletions
|
|
@ -1,17 +1,16 @@
|
|||
volumes:
|
||||
#SSL
|
||||
certs:
|
||||
acme:
|
||||
html:
|
||||
# NextCloud
|
||||
nc-data:
|
||||
db-data:
|
||||
|
||||
networks:
|
||||
proxy-tier:
|
||||
reverse_proxy-tier:
|
||||
external: true
|
||||
nextcloud:
|
||||
external: false
|
||||
|
||||
services:
|
||||
# ============ NextCloud
|
||||
# NextCloud
|
||||
nextcloud:
|
||||
build: ./images/nc
|
||||
restart: always
|
||||
|
|
@ -29,22 +28,25 @@ services:
|
|||
- db.env
|
||||
- nc_config.env
|
||||
networks:
|
||||
- default
|
||||
- proxy-tier
|
||||
- nextcloud
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
# janitor
|
||||
nextcloud-janitor:
|
||||
build: ./images/nc
|
||||
restart: always
|
||||
volumes:
|
||||
- nc-data:/var/www/html
|
||||
volumes_from:
|
||||
- nextcloud:rw
|
||||
entrypoint: /cron.sh
|
||||
networks:
|
||||
- nextcloud
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
# Frontend php proxy
|
||||
nextcloud-front:
|
||||
build: ./images/ngx
|
||||
restart: always
|
||||
|
|
@ -58,49 +60,9 @@ services:
|
|||
depends_on:
|
||||
- nextcloud
|
||||
networks:
|
||||
- default
|
||||
- proxy-tier
|
||||
|
||||
# =========== SSL
|
||||
|
||||
reverse_proxy:
|
||||
build: ./images/proxy
|
||||
restart: always
|
||||
labels:
|
||||
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs:ro
|
||||
- ./vhost.d/:/etc/nginx/vhost.d:ro
|
||||
- html:/usr/share/nginx/html
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
networks:
|
||||
- proxy-tier
|
||||
environment:
|
||||
- ENABLE_IPV6=true
|
||||
- SHA1_UPSTREAM_NAME=true
|
||||
- TRUST_DOWNSTREAM_PROXY=false
|
||||
- RESOLVERS=8.8.8.8 8.8.4.4 [2001:4860:4860::8888] [2001:4860:4860::8844] valid=300s ipv6=on
|
||||
|
||||
letsencrypt-companion:
|
||||
image: docker.io/nginxproxy/acme-companion
|
||||
restart: always
|
||||
volumes:
|
||||
- certs:/etc/nginx/certs
|
||||
- acme:/etc/acme.sh
|
||||
- ./vhost.d:/etc/nginx/vhost.d
|
||||
- html:/usr/share/nginx/html
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
networks:
|
||||
- proxy-tier
|
||||
depends_on:
|
||||
- reverse_proxy
|
||||
environment:
|
||||
#- ACME_CA_URI=https://acme-staging-v02.api.letsencrypt.org/directory # test-server
|
||||
- DEFAULT_EMAIL=admin@uwu.email
|
||||
|
||||
- nextcloud
|
||||
- reverse_proxy-tier
|
||||
# db
|
||||
db:
|
||||
image: postgres:14-alpine
|
||||
restart: always
|
||||
|
|
@ -110,8 +72,12 @@ services:
|
|||
- db-data:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- db.env
|
||||
shm_size: 256MB
|
||||
shm_size: 512MB
|
||||
networks:
|
||||
- nextcloud
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
networks:
|
||||
- nextcloud
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
FROM nginxproxy/nginx-proxy:alpine
|
||||
|
||||
COPY uploadsize.conf /etc/nginx/conf.d/uploadsize.conf
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
client_max_body_size 10G;
|
||||
proxy_read_timeout 3600;
|
||||
proxy_request_buffering off;
|
||||
#client_body_temp_path /tmp/ngx 1 2;
|
||||
#proxy_buffering off;
|
||||
proxy_connect_timeout 3600;
|
||||
proxy_send_timeout 3600;
|
||||
send_timeout 3600;
|
||||
Loading…
Add table
Add a link
Reference in a new issue