Tested with NetBox Community v4.2.5-Docker-3.2.0
The attached docker-compose.override.yml shows a full working example bundled with Caddy. Running it should make Netbox accessible at https://mydomain.net/netbox.
This variant of Caddy doesn't require a user-defined Caddyfile for configuration. Rather it dynamically derives the Caddyfile from aggregated Docker labels. See https://github.com/lucaslorentz/caddy-docker-proxy for more info.
Otherwise, follow the next section to configure an existing Caddy instance using a regular Caddyfile.