infrastructure/roles/caddy/vars/main.yml

41 lines
1.1 KiB
YAML

---
caddy_acmedns_user: "{{ vault_caddy.acmedns.user }}"
caddy_acmedns_pass: "{{ vault_caddy.acmedns.pass }}"
caddy_acmedns_subd: "{{ vault_caddy.acmedns.subd }}"
caddy_acmedns_url: "https://{{ acme_dns.host }}"
caddy_ports_default:
- 80:80
- 443:443
- 443:443/udp
- "{{ host_vpn.ip }}:2019:2019"
caddy_ports_extra: "{{ all_services | my_service_attributes(inventory_hostname, 'ports') }}"
caddy_ports: "{{ caddy_ports_default | union(caddy_ports_extra) }}"
caddy_svc:
name: caddy
caddy_env:
CADDY_ADMIN: 0.0.0.0:2019
ACMEDNS_USER: "{{ caddy_acmedns_user }}"
ACMEDNS_PASS: "{{ caddy_acmedns_pass }}"
ACMEDNS_SUBD: "{{ caddy_acmedns_subd }}"
ACMEDNS_URL: "{{ caddy_acmedns_url }}"
caddy_compose:
watchtower: false
image: "{{ (container_registry.public, 'services/caddy:2-alpine') | path_join }}"
volumes:
- "./config:/etc/caddy/"
- data:/data
file:
services:
app:
build:
context: .
ports: "{{ caddy_ports }}"
extra_hosts:
- host.docker.internal:host-gateway
volumes:
data: