From 48858743b4f578192b9c31e46b01c718ea422627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Sun, 2 Aug 2026 05:44:14 +0200 Subject: [PATCH] Add initial Caddy configuration files --- .vscode/settings.json | 6 ++++++ Caddy/.env.example | 0 Caddy/Dockerfile | 4 ++++ Caddy/compose.yaml | 29 +++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 Caddy/.env.example create mode 100644 Caddy/Dockerfile create mode 100644 Caddy/compose.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d2564dc --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "cSpell.words": [ + "qbittorrent", + "tmpfs" + ] +} \ No newline at end of file diff --git a/Caddy/.env.example b/Caddy/.env.example new file mode 100644 index 0000000..e69de29 diff --git a/Caddy/Dockerfile b/Caddy/Dockerfile new file mode 100644 index 0000000..dc220f2 --- /dev/null +++ b/Caddy/Dockerfile @@ -0,0 +1,4 @@ +FROM caddy:2-builder AS builder +RUN xcaddy build --with github.com/caddy-dns/cloudflare +FROM caddy:2 +COPY --from=builder /usr/bin/caddy /usr/bin/caddy \ No newline at end of file diff --git a/Caddy/compose.yaml b/Caddy/compose.yaml new file mode 100644 index 0000000..e0f0061 --- /dev/null +++ b/Caddy/compose.yaml @@ -0,0 +1,29 @@ +services: + caddy: + build: + context: . + restart: unless-stopped + cap_add: + - NET_ADMIN + networks: + - web + environment: + # Zone.Zone:Read and Zone.DNS:Edit + CLOUDFLARE_API_TOKEN: ${CLOUDFLARE_API_TOKEN} + ports: + - "80:80/tcp" + - "443:443/tcp" + - "443:443/udp" + volumes: + - /mnt/Docker/Data/Caddy/conf:/etc/caddy + - /mnt/Docker/Data/Caddy/data:/data + - /mnt/Docker/Data/Caddy/config:/config + + - /mnt/fourteen/Data/www:/mnt/fourteen/Data/www:ro + - /mnt/fourteen/Data/DiscordEmbed:/mnt/fourteen/Data/DiscordEmbed:ro + + - /var/log/caddy:/var/log/caddy +networks: + web: + external: true + name: web \ No newline at end of file