diff --git a/caddy/.env.example b/caddy/.env.example new file mode 100644 index 0000000..f96267b --- /dev/null +++ b/caddy/.env.example @@ -0,0 +1 @@ +CLOUDFLARE_API_TOKEN=your_token_here diff --git a/caddy/.gitignore b/caddy/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/caddy/.gitignore @@ -0,0 +1 @@ +.env diff --git a/caddy/Caddyfile b/caddy/Caddyfile new file mode 100644 index 0000000..016c5c8 --- /dev/null +++ b/caddy/Caddyfile @@ -0,0 +1,7 @@ +{ + acme_dns cloudflare {env.CLOUDFLARE_API_TOKEN} +} + +bloombase.kerkman.io { + reverse_proxy localhost:8083 +} diff --git a/caddy/Dockerfile b/caddy/Dockerfile new file mode 100644 index 0000000..fe6cb41 --- /dev/null +++ b/caddy/Dockerfile @@ -0,0 +1,6 @@ +FROM caddy:builder AS builder +RUN xcaddy build \ + --with github.com/caddy-dns/cloudflare + +FROM caddy:latest +COPY --from=builder /usr/bin/caddy /usr/bin/caddy diff --git a/caddy/docker-compose.yml b/caddy/docker-compose.yml new file mode 100644 index 0000000..943d398 --- /dev/null +++ b/caddy/docker-compose.yml @@ -0,0 +1,15 @@ +services: + caddy: + build: . + container_name: caddy + restart: unless-stopped + network_mode: host + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile + - caddy_data:/data + - caddy_config:/config + env_file: .env + +volumes: + caddy_data: + caddy_config: