Files
ansible/group_vars/all/infrastructure.yml
T
PhilandClaude Opus 5.5 e569a56417 Reserve fixed IPs on the lava network so Caddy can always start
lava was created by hand without an ip_range, so any container could be
given Caddy's fixed IP (172.20.0.5). After a reboot the containers race
for the low addresses and Caddy often fails with "Address already in use".

- The docker role now creates lava as 172.20.0.0/16 with dynamic
  addresses limited to 172.20.128.0/17, so 172.20.0.x is free for fixed
  IPs, and warns if the network still has the old layout.
- Gitea gets fixed IP 172.20.0.6 once the network has the reserved range,
  since its ufw-docker SSH rule points at its IP.
- ufw-docker allow rules for Caddy (80, 443) and Gitea SSH are managed by
  the playbook and follow IP changes.
- migrate-lava-network.yml recreates the existing network once: it takes
  down every compose project on lava (volumes kept), recreates the
  network, and brings them back up, Caddy first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:04:22 -06:00

33 lines
886 B
YAML

# Infrastructure Configuration
# Docker configuration
docker:
network_name: "lava"
stacks_path: "/opt/stacks"
hairpin_ip: "172.20.0.5" # Caddy's fixed IP
# Shared network layout. Docker only hands out addresses from ip_range,
# so 172.20.0.x is kept free for fixed IPs and can't be taken by others.
subnet: "172.20.0.0/16"
gateway: "172.20.0.1"
ip_range: "172.20.128.0/17"
gitea_ip: "172.20.0.6" # fixed so the ufw-docker SSH rule stays valid
# SMTP configuration
smtp:
host: "smtp.resend.com"
username: "resend"
from_domain: "{{ email_domains.updates }}"
# Network configuration
network:
netcup_ip: "152.53.36.98"
docker_host_ip: "100.70.169.99"
tailscale_hostname: "netcup.porgy-porgy.ts.net"
# Paths
paths:
stacks: "{{ docker.stacks_path }}"
# Notification services
notifications:
appriseapi_endpoint: "http://apprise:8000/notify/apprise"