From 48d1edbdc6ba6464d2c13bae316186e981c8b98b Mon Sep 17 00:00:00 2001 From: SimmerV <91698479+SimmerV@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:07:17 -0800 Subject: [PATCH 1/2] Create Dockerfile.caddy --- Dockerfile.caddy | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Dockerfile.caddy diff --git a/Dockerfile.caddy b/Dockerfile.caddy new file mode 100644 index 0000000..55974dd --- /dev/null +++ b/Dockerfile.caddy @@ -0,0 +1,13 @@ +# Use the official Caddy builder +FROM caddy:builder AS builder + +# Add the Cloudflare DNS plugin +RUN xcaddy build \ + --with github.com/caddy-dns/cloudflare + +# Use the official Caddy base image +FROM caddy:latest + +# Copy the custom Caddy binary +COPY --from=builder /usr/bin/caddy /usr/bin/caddy + From b5c0a6513e31d72ccb50b41a280cff18c2ff1b93 Mon Sep 17 00:00:00 2001 From: SimmerV <91698479+SimmerV@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:13:57 -0800 Subject: [PATCH 2/2] Update docker-compose.yml include cloudflare api token line, commented out --- docker-compose.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c06ddec..1146e10 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,7 +41,9 @@ services: restart: always caddy: - image: caddy:latest + build: + context: . + dockerfile: Dockerfile.caddy ports: - 80:80 - 443:443 @@ -52,6 +54,7 @@ services: - ./public/images:/srv/images environment: - CADDY_AGREE=true + #- CLOUDFLARE_API_TOKEN= restart: always depends_on: - meshinfo