Add domain to hosts file (script runs sudo)
add-host your.domain.comOne-time setup
brew install caddyIn one tab, start up Orchid using the production config (this sets API_BASE to production Swarm backend)
doppler run --project orchid --config prd -- pnpm --filter orchid devIn a second tab, start up Caddy. This will create a reverse proxy to orchid (port 3004). It will automatically create certificates for the specified domain.
caddy reverse-proxy --to ":3004" --internal-certs --from "your.domain.com"Open Chrome to chrome://net-internals/#dns and click Clear host cache. This will ensure that Chrome picks up the
host names you added to /etc/hosts
You can now open your browser to https://your.domain.com and you'll see that your local Orchid app is serving the domain. Since you've updated the Doppler config, it is hitting the production Swarm.
NOTE: If the browser complains about the certificate, just proceed anyway.
When you're done with your debugging session, be sure to undo the steps you performed above:
-
Stop the
caddyprocess (Ctrl-C or close the terminal) -
Remove the domain from the
hostsfile
rm-host your.domain.com