1. The problem I’m having:
I want to host only a couple of docker container that stay local but also want to have a couple exposed to the web, at the moment i cant have both as when i exposed them to the web it trys to get certificates for my locals and they fail to display. when i use the variable local_certs duckdns uses the local certs.
help as chatgpt is rubbish and is leading me down rabbit holes?
2. Error messages and/or full log output:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
3. Caddy version:
docker v 2.10.0
4. How I installed and ran Caddy:
a. System environment:
docker
b. Command:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
c. Service/unit/compose file:
services:
caddy:
network_mode: host
image: serfriz/caddy-duckdns:latest
container_name: caddy
#image: caddy:alpine
restart: unless-stopped
environment:
- DUCKDNS_API_TOKEN=TOKEN # DuckDNS API token (if applicable)
dns:
- "192.168.0.242"
ports:
- "2019:2019"
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
- caddy_data:/data
- caddy_config:/config
# - /etc/hosts:/etc/hosts:ro
volumes:
caddy_data:
caddy_config:
d. My complete Caddy config:
{
email fraserhunter@gmail.com
# local_certs
}
pihole.home {
#encode zstd gzip
redir / /admin{uri}
reverse_proxy http://192.168.0.242:8001
}
homepage.home {
reverse_proxy http://192.168.0.242:3000
}
komodo.home {
reverse_proxy http://192.168.0.242:9120
}
esp.home {
reverse_proxy http://192.168.0.242:6052
}
z2mqqt.home {
reverse_proxy http://192.168.0.242:8080
}
ab.home {
reverse_proxy 192.168.0.242:13378
}
https://port.home {
reverse_proxy 192.168.0.242:9443 {
transport http {
tls
tls_insecure_skip_verify
}
}
}
#ha.localhost:8123 {
# reverse_proxy 192.168.0.242:8123
#}
host1.domain.duckdns.org {
reverse_proxy 192.168.0.242:13378
}
host2.domain.duckdns.org {
reverse_proxy 192.168.0.242:8123
}
host3.domain.duckdns.org {
reverse_proxy 192.168.0.1
}