nginx and registry to swarm

This commit is contained in:
2025-05-16 19:40:51 +02:00
parent b46764f83c
commit 0ce39ab6d0
2 changed files with 34 additions and 23 deletions
+20 -17
View File
@@ -2,14 +2,6 @@ version: "3.8"
#https://github.com/nginx-proxy/nginx-proxy
#https://github.com/nginx-proxy/acme-companion:
networks:
nextcloud_default:
external: true
ansible_docker_registry:
external: true
proxy-tier:
volumes:
certs:
conf:
@@ -30,23 +22,28 @@ services:
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
networks:
- nextcloud_default
- ansible_docker_registry
- proxy-tier
environment:
SIZE_LIMIT: |
client_max_body_size 0;
proxy_request_buffering off;
LOG_JSON: |-
true
labels:
- com.github.nginx-proxy.nginx
command:
/bin/sh -c "echo \"$$SIZE_LIMIT\" > /etc/nginx/conf.d/nginx_size_limit.conf; forego start -r"
deploy:
placement:
constraints:
- node.hostname==odroid
mode: replicated
replicas: 1
networks:
default:
nginx_acme:
image: nginxproxy/acme-companion
restart: always
volumes_from:
- "nginx"
volumes:
- conf:/etc/nginx/conf.d
- certs:/etc/nginx/certs
@@ -56,7 +53,13 @@ services:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DEFAULT_EMAIL=rudolfss13@gmail.com
networks:
- proxy-tier
depends_on:
- nginx
deploy:
placement:
constraints:
- node.hostname==odroid
mode: replicated
replicas: 1
networks:
default:
+14 -6
View File
@@ -1,10 +1,7 @@
version: "3.8"
networks:
docker_registry:
services:
repository:
registry:
image: arm64v8/registry:2
restart: always
ports:
@@ -14,8 +11,19 @@ services:
- LETSENCRYPT_HOST=registry.rudolf.keenetic.link
- VIRTUAL_PORT=5000
volumes:
- /media/DATA/runtime/docker_registry:/var/lib/registry
- data:/var/lib/registry
networks:
- docker_registry
- nginx_default
networks:
nginx_default:
external: true
volumes:
data:
driver: local
driver_opts:
type: nfs
o: addr=192.168.1.96
device: :/media/DATA/runtime/docker_registry