Add a cloudflared connector for git.DOMAIN on the Gitea LXC
Gitea gets its own remotely managed Cloudflare tunnel, run beside it on the LXC, so public HTTPS for git.DOMAIN no longer has to pass through stpvm. It is a separate tunnel from the site's, since a tunnel's connectors share all its hostnames. It sits behind the `tunnel` profile until git.DOMAIN is the canonical address, so a routine `docker compose up -d` does not publish it early. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -124,3 +124,29 @@ services:
|
||||
depends_on:
|
||||
gitea-db:
|
||||
condition: service_healthy
|
||||
|
||||
# Public HTTPS for git.DOMAIN through Gitea's OWN Cloudflare tunnel, so the
|
||||
# public Gitea no longer passes through stpvm. Remotely managed: the
|
||||
# hostname -> origin mapping (git.DOMAIN -> http://gitea:3000) lives in the
|
||||
# Zero Trust dashboard and only the token is here. It must be a separate
|
||||
# tunnel from the site's: connectors of one tunnel share all its hostnames,
|
||||
# so a second connector here would be sent www traffic too.
|
||||
#
|
||||
# The tunnel carries HTTP only, with Cloudflare's 100 MB request-body cap, so
|
||||
# SSH (2222), registry pushes and CI stay on the LAN/tailnet path above.
|
||||
#
|
||||
# Behind the `tunnel` profile until git.DOMAIN is the canonical address
|
||||
# (ROOT_URL, the history-view protection), so a routine `docker compose up
|
||||
# -d` does not publish it early: start it with
|
||||
# docker compose --profile tunnel up -d
|
||||
# and drop the profile once the cutover is done.
|
||||
cloudflared:
|
||||
image: cloudflare/cloudflared:2026.9.3
|
||||
container_name: gitea-cloudflared
|
||||
profiles: ["tunnel"]
|
||||
restart: always
|
||||
command: ["tunnel", "--no-autoupdate", "run"]
|
||||
environment:
|
||||
- TUNNEL_TOKEN=${GITEA_TUNNEL_TOKEN:-}
|
||||
depends_on:
|
||||
- gitea
|
||||
|
||||
Reference in New Issue
Block a user