Skip to content

Commit 2eafc7e

Browse files
authored
Merge pull request #785 from lucaslorentz/docs/caddyfile-autosave-path
Document and log the Caddyfile autosave path
2 parents 90f45ae + 944fefd commit 2eafc7e

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)