Environement
- Podman
- Image: Caddy-2.7.2-alpine
Step to reproduce
- Create Caddyfile :
http://localhost
respond "Hello World"
- Create container :
podman run -d \
-v path/to/Caddyfile:/etc/caddy/Caddyfile:ro \
-v /srv:/srv:ro \
-v caddy_data:/data \
-v caddy_config:/config \
-p 80:80 \
--name caddy docker.io/caddy-alpine
- run
curl localhost, output Hello World
- Modify Caddyfile's respond line to
respond "Goodbye World"
- Run
podman exec -w /etc/caddy caddy caddy reload
curl localhost, output Hello World instead of Goodbye World
Workaround
Restart the container with podman restart caddy
Log Output after run caddy reload
{"level":"info","ts":1691840974.3116052,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"54268","headers":{"Accept-Encoding":["gzip"],"Content-Length":["230"],"Content-Type":["application/json"],"Origin":["http://localhost:2019"],"User-Agent":["Go-http-client/1.1"]}}
{"level":"info","ts":1691840974.3117096,"msg":"config is unchanged"} # <-- Seems that it does not detect the value of respond changed
{"level":"info","ts":1691840974.311715,"logger":"admin.api","msg":"load complete"}
Also Tried
Seeing the log output, I think maybe it does not detect a change of the value in respond. So I tried adding a new directive, but it still does not work. Furthermore, the log output still say config is unchanged
- Edit
Caddyfile and add header Custom-Header "My value"
- Run
podman exec -w /etc/caddy caddy caddy reload
- Run
curl -v localhost, I should see the newly added header in the response but it's not there
Environement
Step to reproduce
curl localhost, outputHello Worldrespond "Goodbye World"podman exec -w /etc/caddy caddy caddy reloadcurl localhost, outputHello Worldinstead ofGoodbye WorldWorkaround
Restart the container with
podman restart caddyLog Output after run
caddy reloadAlso Tried
Seeing the log output, I think maybe it does not detect a change of the value in respond. So I tried adding a new directive, but it still does not work. Furthermore, the log output still say
config is unchangedCaddyfileand addheader Custom-Header "My value"podman exec -w /etc/caddy caddy caddy reloadcurl -v localhost, I should see the newly added header in the response but it's not there