Skip to content

Commit 944fefd

Browse files
lucaslorentzclaude
andcommitted
Document and log the Caddyfile autosave path
The generated Caddyfile is saved to Caddyfile.autosave inside Caddy's config directory, but users had no way to discover this. Now the path is: - Logged once at startup in the existing "Start" log line - Documented in a new README section Closes #745 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 89dc140 commit 944fefd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,14 @@ CADDY_DOCKER_NO_SCOPE=<bool, default scope used>
550550
551551
Check **examples** folder to see how to set them on a Docker Compose file.
552552
553+
## Viewing the generated Caddyfile
554+
555+
The generated Caddyfile is automatically saved to `Caddyfile.autosave` inside Caddy's config directory whenever it changes. The full path is logged at startup and depends on the environment (typically `/config/caddy/Caddyfile.autosave` in Docker). You can inspect it to troubleshoot label-to-Caddyfile conversion issues:
556+
557+
```sh
558+
docker exec <caddy-container> cat /config/caddy/Caddyfile.autosave
559+
```
560+
553561
## Docker images
554562
Docker images are available at Docker hub:
555563
https://hub.docker.com/r/lucaslorentz/caddy-docker-proxy/

loader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ func (dockerLoader *DockerLoader) Start() error {
158158
zap.Strings("DockerSockets", dockerLoader.options.DockerSockets),
159159
zap.Strings("DockerCertsPath", dockerLoader.options.DockerCertsPath),
160160
zap.Strings("DockerAPIsVersion", dockerLoader.options.DockerAPIsVersion),
161+
zap.String("CaddyfileAutosavePath", CaddyfileAutosavePath),
161162
)
162163

163164
ready := make(chan struct{})

0 commit comments

Comments
 (0)