Set Gitea's SSH_DOMAIN and DOMAIN from GITEA_SSH_DOMAIN in .env
Moving hosts meant hand-editing the live app.ini, which the template cannot reach once it exists. Gitea's environment-to-ini now writes the value on every start, so a move is a one-line .env change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -63,6 +63,10 @@ GITEA_INTERNAL_TOKEN=
|
||||
GITEA_LFS_JWT_SECRET=
|
||||
GITEA_OAUTH2_JWT_SECRET=
|
||||
POSTGRES_GITEA_DB=gitea
|
||||
# The host's Tailscale MagicDNS name (e.g. stpvm.tailf20278.ts.net), shown in
|
||||
# Gitea's SSH clone URLs. Not the public domain: 2222 is reachable only over
|
||||
# the tailnet. Becomes Gitea's SSH_DOMAIN and DOMAIN. Blank means localhost.
|
||||
GITEA_SSH_DOMAIN=
|
||||
|
||||
# --- Gitea Actions runner ----------------------------------------------------
|
||||
# The runner is NOT a container; it runs on the Pi via gitea-runner/run.sh.
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ Setup, once:
|
||||
that wants the public site. Pushing from another machine still goes
|
||||
through Cloudflare and its cap; use the host's Tailscale name for that.
|
||||
- **Gitea SSH (2222).** Not HTTP, so not tunnelled. Already Tailscale-only:
|
||||
`SSH_DOMAIN` in `gitea/config/app.ini.template` is the host's MagicDNS name
|
||||
`GITEA_SSH_DOMAIN` in `.env` (Gitea's `SSH_DOMAIN`) is the host's MagicDNS name
|
||||
and 2222 has never been forwarded. Nothing changes.
|
||||
- **The radio harbor (8001).** Also a raw source protocol, so a DJ client
|
||||
pointed at `<DOMAIN>:8001` stops connecting once the domain resolves to
|
||||
|
||||
@@ -646,6 +646,12 @@ services:
|
||||
- GITEA__server__LFS_JWT_SECRET=${GITEA_LFS_JWT_SECRET}
|
||||
- GITEA__security__INTERNAL_TOKEN=${GITEA_INTERNAL_TOKEN}
|
||||
- GITEA__oauth2__JWT_SECRET=${GITEA_OAUTH2_JWT_SECRET}
|
||||
# The host's own name, which Gitea prints in SSH clone URLs. It lives in
|
||||
# .env, not app.ini, so moving to another host is a one-line change;
|
||||
# environment-to-ini writes it into the live app.ini on every start.
|
||||
# localhost suits dev.
|
||||
- GITEA__server__SSH_DOMAIN=${GITEA_SSH_DOMAIN:-localhost}
|
||||
- GITEA__server__DOMAIN=${GITEA_SSH_DOMAIN:-localhost}
|
||||
# Webhooks are refused to private addresses by default ("external").
|
||||
# The usaco site's push hook targets http://usaco:8080 on the Docker
|
||||
# network, so that one host is allowed by name.
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
; 22 and cannot use the host's sshd, so Gitea runs its own Go SSH server.
|
||||
; 2222 is published in docker-compose.yml; the deploy workflow clones over
|
||||
; ssh://git@localhost:2222.
|
||||
; SSH_DOMAIN is the Pi's Tailscale MagicDNS name, not the public domain: SSH
|
||||
; SSH_DOMAIN and DOMAIN are not set here: they come from GITEA_SSH_DOMAIN in
|
||||
; ./.env (see docker-compose.yml). The value is the host's Tailscale
|
||||
; MagicDNS name, not the public domain: SSH
|
||||
; (22 and 2222) is not forwarded by the router, so the SSH clone URL Gitea
|
||||
; shows only works from a device on the tailnet. HTTPS clones go through
|
||||
; nginx at ROOT_URL and stay public.
|
||||
@@ -50,7 +52,6 @@ TEMP_PATH = /tmp/gitea/uploads
|
||||
|
||||
[server]
|
||||
APP_DATA_PATH = /var/lib/gitea
|
||||
SSH_DOMAIN = stpvm.tailf20278.ts.net
|
||||
HTTP_PORT = 3000
|
||||
ROOT_URL = https://adam-french.co.uk/gitea/
|
||||
DISABLE_SSH = false
|
||||
@@ -60,7 +61,6 @@ SSH_PORT = 2222
|
||||
SSH_LISTEN_PORT = 2222
|
||||
BUILTIN_SSH_SERVER_USER = git
|
||||
LFS_START_SERVER = true
|
||||
DOMAIN = stpvm.tailf20278.ts.net
|
||||
LFS_JWT_SECRET =
|
||||
OFFLINE_MODE = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user