Β
- Add A record
- NS server right is required
- Install auto-ssl image
- Create Caddyfile
api.buhe.dev { reverse_proxy localhost:3040 }
. βββ Caddyfile βββ config βββ data
docker run --network host -d --cap-add=NET_ADMIN -p 80:80 -p 443:443 -p 443:443/udp \ -v /root/caddy/Caddyfile:/etc/caddy/Caddyfile \ -v /root/caddy/data:/data \ -v /root/caddy/config:/config \ caddy
Β
Β
PS:
Some utils.
caddy_container_id=$(docker ps | grep caddy | awk '{print $1;}') docker exec -w /etc/caddy $caddy_container_id caddy fmt --overwrite docker exec -w /etc/caddy $caddy_container_id caddy reload