railyard/apps/gitea/.env.example
caelum0x 4af32789c1 fix(gitea): SSH clone URLs must use a DNS-only hostname, not the proxied one
GITEA__server__SSH_DOMAIN was defaulting to the same Cloudflare-proxied
(orange-cloud) hostname as DOMAIN/ROOT_URL. Cloudflare's proxy only
forwards HTTP(S) (80/443), so every advertised ssh://git@git.ereboslab.com:2222/...
clone URL timed out for end users even with the port open on the box and
in the OCI VCN security list.

Split SSH_DOMAIN into its own GITEA_SSH_DOMAIN env var pointed at a new
DNS-only A record (git-ssh.ereboslab.com, same IP, created via the
Cloudflare API). Verified live on railyard-box: real `git push` over
ssh://git@git-ssh.ereboslab.com:2222/... lands; the repo API now
advertises that working URL instead of the dead proxied one.
2026-10-25 03:05:39 +03:00

64 lines
2.9 KiB
Plaintext

# apps/gitea/.env.example — copy to .env and fill in for local or production use.
# docker compose reads this automatically (docker compose --env-file .env ...
# or just `cp .env.example .env` next to docker-compose.yml).
# --- domain / URLs ----------------------------------------------------------
GITEA_DOMAIN=git.ereboslab.com
GITEA_ROOT_URL=https://git.ereboslab.com/
GITEA_SSH_PUBLIC_PORT=2222
# GITEA_SSH_DOMAIN MUST be a DNS-only (grey-cloud) hostname, never the same
# Cloudflare-proxied (orange-cloud) hostname as GITEA_DOMAIN above -- the
# Cloudflare proxy only forwards HTTP(S), so a clone URL built from a proxied
# hostname times out on port 2222 for every end user even when the box's
# firewall/VCN security list correctly allow it. Confirmed real 2026-10-25:
# ssh://git@git.ereboslab.com:2222/... timed out; ssh://git@git-ssh.ereboslab.com:2222/...
# (DNS-only A record, same IP) and the raw IP both worked.
GITEA_SSH_DOMAIN=git-ssh.ereboslab.com
# --- local proof overrides (safe defaults; unset these in production) ------
# GITEA_DOMAIN=localhost
# GITEA_ROOT_URL=http://localhost:3300/
# GITEA_HTTP_HOST_PORT=3300
# GITEA_SSH_HOST_PORT=2222
# GITEA_DB_HOST_PORT=5433
# --- secrets (REQUIRED in production — generate with the gitea CLI) --------
# docker compose run --rm gitea gitea generate secret SECRET_KEY
# docker compose run --rm gitea gitea generate secret INTERNAL_TOKEN
GITEA_SECRET_KEY=
GITEA_INTERNAL_TOKEN=
GITEA_DB_PASSWORD=change-me
# --- image pin (bump after checking release notes) --------------------------
GITEA_IMAGE_TAG=1.23
# --- accounts: native Gitea auth, or Railyard SSO (see the railyard-sso
# block in docker-compose.yml -- closed, backlog item 5) ----------------
GITEA_DISABLE_REGISTRATION=false
# --- billing bridge (integrations/railyard/webhook-bridge) ------------------
RITHUB_WEBHOOK_SECRET=
RAGO_WEBHOOK_SECRET=
RAGO_BASE_URL=http://127.0.0.1:8080
RAGO_API_KEY=
MINT_BASE_URL=
MINT_API_KEY=
MINT_PLATFORM_ACCT=
MINT_ORG_ACCT_MAP={}
# --- Actions CI runner (act_runner) -----------------------------------------
# Actions is enabled on the gitea service above, but a pushed
# `.gitea/workflows/*.yml` job never executes without a registered runner.
# Generate a one-time registration token once the gitea service is up:
# docker compose exec -u git gitea gitea actions generate-runner-token
# then paste it here and `docker compose up -d act_runner`. The token is
# only consumed on the runner's first boot (it persists its own credentials
# in the gitea-runner-data volume after that) — safe to blank out again
# once the runner shows "Idle" under Site Administration -> Actions -> Runners.
GITEA_RUNNER_TOKEN=
GITEA_RUNNER_NAME=railyard-box
ACT_RUNNER_IMAGE_TAG=0.6.1
# Only needed if act_runner runs on a different host than the gitea
# container; default resolves gitea by its compose service name.
# ACT_RUNNER_INSTANCE_URL=http://gitea:3000