Serve the site through a Cloudflare tunnel
A cloudflared container dials out to Cloudflare and forwards the site's hostnames to nginx on :443, so the router's 80/443 forwards can close. nginx takes the visitor's address from CF-Connecting-IP, trusted only from cloudflared's fixed IP, so rate limits stay per visitor. certbot can now validate over DNS-01 through the Cloudflare API when CLOUDFLARE_DNS_API_TOKEN is set, so renewal needs no inbound port; without it, it falls back to the webroot as before. DEPLOYMENT.md covers setup and what stays off the tunnel: registry traffic on the Pi (pin the apex to 127.0.0.1 to dodge the 100 MB body cap), Gitea SSH and the radio harbor (Tailscale). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
# nginx_dev.conf.template and self-sign a localhost certificate.
|
||||
# - python : uvicorn --reload with the app source bind-mounted.
|
||||
# - certbot : disabled entirely.
|
||||
# - cloudflared : disabled entirely.
|
||||
#
|
||||
# HOW TO REACH IT
|
||||
# http://localhost (HTTPS also works on :443 with the self-signed cert, which
|
||||
@@ -93,3 +94,9 @@ services:
|
||||
# Let's Encrypt could not validate localhost anyway.
|
||||
profiles:
|
||||
- disabled
|
||||
cloudflared:
|
||||
# Same profile trick as certbot. A dev stack must never join the
|
||||
# production tunnel: Cloudflare would load-balance real visitors onto
|
||||
# this machine's seeded database.
|
||||
profiles:
|
||||
- disabled
|
||||
|
||||
Reference in New Issue
Block a user