Run docker compose up -d to start caddy. Ensure you have stopped all other reverse proxies. Caddy can be easily configured to replace other reverse proxies and host all your sites.
Two folders will be created: site will be the /srv directory inside Caddy container, where you can put your static sites, and conf is /etc/caddy inside our container, where Caddyfile is located.
Now, create the following Caddyfile in conf directory:
Ensure to replace bitcart.yourdomain.tld with your actual domain running bitcart
Restart caddy:
Now everything should work automatically!
Your client ip will be properly determined, and bitcart nginx will handle SSL certificates instead of Caddy. For other apps hosted on the same server, use host.docker.internal to access localhost of your machine.
You can also add caddy to custom docker networks to access other services by container name, for example: