diff --git a/stacks/core/caddy/Caddyfile b/stacks/core/caddy/Caddyfile new file mode 100644 index 0000000..fb4ff3d --- /dev/null +++ b/stacks/core/caddy/Caddyfile @@ -0,0 +1,26 @@ +{ + auto_https disable_redirects +} + +# Caddy Dashboard (optional) +:2019 { + metrics /metrics +} + +# Portainer +portainer.frostlabs.home { + reverse_proxy portainer:9000 + tls internal +} + +# Paperless-NGX +docs.frostlabs.home { + reverse_proxy paperless:8000 + tls internal +} + +# Adminer +miner.frostlabs.home { + reverse_proxy adminer:8091 + tls internal +} \ No newline at end of file diff --git a/stacks/core/caddy/stack.yml b/stacks/core/caddy/stack.yml new file mode 100644 index 0000000..a6f9b24 --- /dev/null +++ b/stacks/core/caddy/stack.yml @@ -0,0 +1,32 @@ +networks: + homelab: + external: true + +services: + caddy: + image: caddy:latest + ports: + - target: 80 + published: 80 + mode: host + - target: 443 + published: 443 + mode: host + - target: 2019 + published: 2019 + mode: host + networks: + - homelab + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile + - /mnt/swarm-data/caddy/data:/data + - /mnt/swarm-data/caddy/config:/config + deploy: + mode: global + placement: + constraints: + - node.role == manager + restart_policy: + condition: on-failure + delay: 5s + max_attempts: 3 \ No newline at end of file