2026-11-23 11:19:29 -03:00
|
|
|
# Cluster node with WireGuard and the App Gateway (Caddy + auth-gateway).
|
|
|
|
|
# For a VPN only node, use cluster_node.yml instead.
|
2026-11-20 11:56:30 -03:00
|
|
|
services:
|
|
|
|
|
cluster-node:
|
2026-11-23 11:19:29 -03:00
|
|
|
container_name: cluster-node
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
image: eduardosilva/wireguard-webadmin-cluster-node:testing
|
|
|
|
|
environment:
|
|
|
|
|
- MASTER_SERVER_ADDRESS=${MASTER_SERVER_ADDRESS}
|
2026-11-25 08:31:45 -03:00
|
|
|
- COMPOSE_VERSION=d1a
|
2026-11-23 11:19:29 -03:00
|
|
|
- TZ=${TIMEZONE}
|
|
|
|
|
- TOKEN=${TOKEN}
|
2026-11-20 11:56:30 -03:00
|
|
|
volumes:
|
2026-11-23 11:19:29 -03:00
|
|
|
- cluster_node_wireguard:/etc/wireguard
|
|
|
|
|
- cluster_node_dnsmasq_conf:/etc/dnsmasq/
|
2026-11-20 11:56:30 -03:00
|
|
|
- cluster_node_caddy_json:/caddy_json_export/
|
|
|
|
|
- cluster_node_caddy_certificates:/caddy_certificates/
|
|
|
|
|
ports:
|
2026-11-23 11:19:29 -03:00
|
|
|
# Ports for WireGuard instances.
|
|
|
|
|
- "51820-51839:51820-51839/udp"
|
2026-11-20 11:56:30 -03:00
|
|
|
# Caddy shares the network of cluster-node, so its ports are published here
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
2026-11-23 11:19:29 -03:00
|
|
|
cap_add:
|
|
|
|
|
- NET_ADMIN
|
|
|
|
|
- SYS_MODULE
|
|
|
|
|
sysctls:
|
|
|
|
|
- net.ipv4.conf.all.src_valid_mark=1
|
|
|
|
|
- net.ipv4.ip_forward=1
|
|
|
|
|
|
|
|
|
|
cluster-node-dns:
|
|
|
|
|
container_name: cluster-node-dns
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
image: eduardosilva/wireguard_webadmin_dns:testing
|
|
|
|
|
# Shares the network of cluster-node, so DNS is answered directly on the WireGuard interfaces
|
|
|
|
|
network_mode: "service:cluster-node"
|
|
|
|
|
environment:
|
|
|
|
|
- TZ=${TIMEZONE}
|
|
|
|
|
volumes:
|
|
|
|
|
- cluster_node_dnsmasq_conf:/etc/dnsmasq/
|
|
|
|
|
depends_on:
|
|
|
|
|
- cluster-node
|
2026-11-20 11:56:30 -03:00
|
|
|
|
|
|
|
|
cluster-node-caddy:
|
|
|
|
|
container_name: cluster-node-caddy
|
|
|
|
|
restart: unless-stopped
|
2026-11-21 10:49:12 -03:00
|
|
|
image: eduardosilva/wireguard_webadmin_caddy:testing
|
2026-11-20 11:56:30 -03:00
|
|
|
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
|
2026-11-21 10:49:12 -03:00
|
|
|
image: eduardosilva/wireguard_webadmin_auth_gateway:testing
|
2026-11-20 11:56:30 -03:00
|
|
|
environment:
|
|
|
|
|
- TZ=${TIMEZONE}
|
|
|
|
|
- AUTH_GATEWAY_CONFIG_DIR=/caddy_json_export
|
|
|
|
|
- AUTH_GATEWAY_DATABASE_PATH=/data/auth-gateway.sqlite3
|
|
|
|
|
volumes:
|
|
|
|
|
- cluster_node_caddy_json:/caddy_json_export/
|
|
|
|
|
- cluster_node_auth_gateway_data:/data
|
|
|
|
|
|
|
|
|
|
volumes:
|
2026-11-23 11:19:29 -03:00
|
|
|
cluster_node_wireguard:
|
|
|
|
|
cluster_node_dnsmasq_conf:
|
2026-11-20 11:56:30 -03:00
|
|
|
cluster_node_caddy_json:
|
|
|
|
|
cluster_node_caddy_certificates:
|
|
|
|
|
cluster_node_caddy_data:
|
|
|
|
|
cluster_node_caddy_config:
|
|
|
|
|
cluster_node_auth_gateway_data:
|