Not able to get caddy working as reverse proxy in docker compose

You have this backwards – this is binding to 80 on the host, connecting to 8000 inside the Caddy container. You have Caddy listening for 80 but it’s going to be receiving requests on port 8000.

Switch that to - 80:80, or switch your Caddyfile to :8000. And make sure your curl command uses whatever port you choose the bind on the host (left side).