1. Caddy version (caddy version
):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
2. How I run Caddy:
a. System environment:
Ubuntu 20.04
Docker 19.03.1
b. Command:
docker-compose up -d caddy2
c. Service/unit/compose file:
version: '3.7'
services:
caddy2:
image: gotson/caddy-cloudflare:latest
container_name: caddy2
volumes:
- ~/opt/appdata/caddy2/Caddyfile:/etc/caddy/Caddyfile
- ~/opt/appdata/caddy2/data:/data
- ~/opt/appdata/caddy2/config:/config
# - ~/opt/appdata/caddy2/glype:/srv
ports:
- 2018:2018
- 2019:2019
- 80:80
- 443:443
environment:
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
restart: unless-stopped
d. My complete Caddyfile or JSON config:
http://0.0.0.0:2018 {
metrics
}
3. The problem I’m having:
I am trying to access the Prometheus metrics from outside the container, but can’t.
Without the added metrics block in my Caddyfile, i tried this without success:
curl localhost:2019/metrics
curl: (56) Recv failure: Connection reset by peer
I try to exposed the metrics as its own domain, listening to 0.0.0.0:2018, but that returns nothing:
curl localhost:2018
curl localhost:2018/metrics
4. Error messages and/or full log output:
nothing relevant even with debug