Rework cluster into v2: section-based worker sync and App Gateway on workers

This commit is contained in:
Eduardo Silva
2026-11-20 11:56:30 -03:00
parent dee270695d
commit 7468cdf623
41 changed files with 2766 additions and 1014 deletions
+54 -6
View File
@@ -1,4 +1,3 @@
version: '3'
services:
cluster-node:
container_name: cluster-node
@@ -8,16 +7,19 @@ services:
dockerfile: Dockerfile-cluster_node
environment:
- MASTER_SERVER_ADDRESS=${MASTER_SERVER_ADDRESS}
- DEBUG_MODE=${DEBUG_MODE}
- COMPOSE_VERSION=c1b
- COMPOSE_VERSION=c2a
- TZ=${TIMEZONE}
- TOKEN=${TOKEN}
volumes:
- cluster_node_wireguard:/etc/wireguard
- cluster_node_dnsmasq_conf:/etc/dnsmasq/
- cluster_node_caddy_json:/caddy_json_export/
- cluster_node_caddy_certificates:/caddy_certificates/
ports:
# Ports for WireGuard instances.
- "51820-51839:51820-51839/udp"
# Different host ports, so the node can run on the same host as the development primary server
- "52820-52839:51820-51839/udp"
- "9080:80"
- "9443:443"
cap_add:
- NET_ADMIN
- SYS_MODULE
@@ -28,11 +30,57 @@ services:
cluster-node-dns:
container_name: cluster-node-dns
restart: unless-stopped
image: eduardosilva/wireguard_webadmin_dns:latest
build:
context: containers/dnsmasq
dockerfile: Dockerfile-dnsmasq
network_mode: "service:cluster-node"
environment:
- TZ=${TIMEZONE}
volumes:
- cluster_node_dnsmasq_conf:/etc/dnsmasq/
depends_on:
- cluster-node
cluster-node-caddy:
container_name: cluster-node-caddy
restart: unless-stopped
build:
context: containers/caddy
dockerfile: Dockerfile-caddy
network_mode: "service:cluster-node"
environment:
- TZ=${TIMEZONE}
- CLUSTER_NODE=true
- AUTH_GATEWAY_INTERNAL_URL=http://cluster-node-auth-gateway:9091
volumes:
- cluster_node_caddy_json:/caddy_json_export/
- cluster_node_caddy_certificates:/caddy_certificates/:ro
- cluster_node_caddy_data:/data
- cluster_node_caddy_config:/config
depends_on:
- cluster-node
- cluster-node-auth-gateway
cluster-node-auth-gateway:
container_name: cluster-node-auth-gateway
restart: unless-stopped
build:
context: containers/auth-gateway
dockerfile: Dockerfile-auth-gateway
environment:
- TZ=${TIMEZONE}
- AUTH_GATEWAY_CONFIG_DIR=/caddy_json_export
- AUTH_GATEWAY_DATABASE_PATH=/data/auth-gateway.sqlite3
- AUTH_GATEWAY_SECURE_COOKIES=false
volumes:
- cluster_node_caddy_json:/caddy_json_export/
- cluster_node_auth_gateway_data:/data
volumes:
cluster_node_wireguard:
cluster_node_dnsmasq_conf:
cluster_node_caddy_json:
cluster_node_caddy_certificates:
cluster_node_caddy_data:
cluster_node_caddy_config:
cluster_node_auth_gateway_data: