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:
|
volumes:
|
||||||
#SSL
|
# NextCloud
|
||||||
certs:
|
|
||||||
acme:
|
|
||||||
html:
|
|
||||||
#NextCloud
|
|
||||||
nc-data:
|
nc-data:
|
||||||
db-data:
|
db-data:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy-tier:
|
reverse_proxy-tier:
|
||||||
|
external: true
|
||||||
|
nextcloud:
|
||||||
|
external: false
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# ============ NextCloud
|
# NextCloud
|
||||||
nextcloud:
|
nextcloud:
|
||||||
build: ./images/nc
|
build: ./images/nc
|
||||||
restart: always
|
restart: always
|
||||||
|
|
@ -29,22 +28,25 @@ services:
|
||||||
- db.env
|
- db.env
|
||||||
- nc_config.env
|
- nc_config.env
|
||||||
networks:
|
networks:
|
||||||
- default
|
- nextcloud
|
||||||
- proxy-tier
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
|
# janitor
|
||||||
nextcloud-janitor:
|
nextcloud-janitor:
|
||||||
build: ./images/nc
|
build: ./images/nc
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes_from:
|
||||||
- nc-data:/var/www/html
|
- nextcloud:rw
|
||||||
entrypoint: /cron.sh
|
entrypoint: /cron.sh
|
||||||
|
networks:
|
||||||
|
- nextcloud
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
|
# Frontend php proxy
|
||||||
nextcloud-front:
|
nextcloud-front:
|
||||||
build: ./images/ngx
|
build: ./images/ngx
|
||||||
restart: always
|
restart: always
|
||||||
|
|
@ -58,49 +60,9 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- nextcloud
|
- nextcloud
|
||||||
networks:
|
networks:
|
||||||
- default
|
- nextcloud
|
||||||
- proxy-tier
|
- reverse_proxy-tier
|
||||||
|
# db
|
||||||
# =========== 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
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:14-alpine
|
image: postgres:14-alpine
|
||||||
restart: always
|
restart: always
|
||||||
|
|
@ -110,8 +72,12 @@ services:
|
||||||
- db-data:/var/lib/postgresql/data
|
- db-data:/var/lib/postgresql/data
|
||||||
env_file:
|
env_file:
|
||||||
- db.env
|
- db.env
|
||||||
shm_size: 256MB
|
shm_size: 512MB
|
||||||
|
networks:
|
||||||
|
- nextcloud
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
restart: always
|
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