Some checks failed
ci / cargo test (abacus) (push) Has been cancelled
ci / cargo test (agent-runtime) (push) Has been cancelled
ci / cargo test (context-passport) (push) Has been cancelled
ci / cargo test (game-economy) (push) Has been cancelled
ci / cargo test (ledgerline) (push) Has been cancelled
ci / cargo test (mint) (push) Has been cancelled
ci / cargo test (rago) (push) Has been cancelled
ci / cargo test (relay) (push) Has been cancelled
ci / cargo test (toolgate) (push) Has been cancelled
ci / cargo test (turnstile) (push) Has been cancelled
ci / cargo test (vend) (push) Has been cancelled
ci / node suites (push) Has been cancelled
- Root cause of lead-reported "SSH push Internal Server Error" was NOT the day's gitea->rithub rename: 146 repos (incl. recoder.xyz, vcpeer) have been stuck at repository.status=1 (RepositoryBeingMigrated) since mid-November, which the engine's own internal serv-command permission API 500s on unconditionally for SSH (reads and writes), never for HTTPS. 144 verified complete on disk and flipped back to status=0 on rithub-server-postgres (box change, no repo file); 2 genuinely incomplete left untouched. - New apps/rithub-server/deploy/entrypoint-wrapper.sh, bind-mounted over the stock gitea/gitea image's own /usr/local/bin/gitea (docker-compose.yml): byte-identical passthrough for every subcommand except `serv`, where it rewrites the engine's hardcoded "Gitea:" stderr prefix to "Rithub:" -- stdout (the git pack-protocol bytes) is never touched. - New grey-cloud git.rithub.dev Caddy site + DNS record (box/Cloudflare-side, no repo file) bypasses Cloudflare's fixed ~100s proxy timeout for large pushes, same pattern as git-ssh.rithub.dev. footer.tmpl rewrites the clone box's HTTPS URL to the new host client-side, since the engine has no server-side domain split for HTTP the way it does for SSH_DOMAIN. Live-verified: SSH clone+push for caelum0x and a fresh QA account, a real ~85MB push over git.rithub.dev (succeeded, ~2min, well past Cloudflare's 100s cutoff), clone-box screenshot showing the rewritten host, full route regression clean. See plans/railyard.md RIT-OPS entry for full evidence. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
411 lines
24 KiB
YAML
411 lines
24 KiB
YAML
# apps/rithub-server — Rithub's code-hosting service: the official
|
|
# go-gitea/gitea image (MIT) + Postgres. Replaces the from-scratch
|
|
# "Rithub + Rit" build (apps/rit, apps/rithub — Rust, preserved, not
|
|
# deleted) per plans/OSS-ADOPTION-2026-10-15.md.
|
|
#
|
|
# app.ini is generated entirely from GITEA__<SECTION>__<KEY> environment
|
|
# variables (the underlying engine's "environment-to-ini" mechanism, a
|
|
# hardcoded prefix in its own source — this is the one thing in this file
|
|
# that cannot be renamed without forking and rebuilding the image, the same
|
|
# class of exception as an upstream Go import path) — no app.ini file is
|
|
# committed. Branding overrides (logo, footer, locale strings) live in
|
|
# ./custom and are bind-mounted over the persistent /data volume's
|
|
# gitea/custom subdirectory, the engine's documented customization path.
|
|
#
|
|
# `name:` below pins the compose project name to "rithub-server" so every
|
|
# container gets a clean `rithub-server-*` name regardless of which
|
|
# directory (apps/gitea locally, /srv/railyard-gitea or /srv/rithub-server
|
|
# on the box) `docker compose` is run from. The Postgres role/db/volume
|
|
# names below (gitea/gitea, gitea-pgdata, gitea-data, gitea-runner-data) are
|
|
# deliberately NOT renamed in this pass: they are live, populated storage on
|
|
# railyard-box — renaming them is a real data migration (new role/db/volume,
|
|
# dump+restore, coordinated cutover), not a naming change, and is tracked
|
|
# as a follow-up in plans/railyard.md rather than risked here.
|
|
#
|
|
# Local proof (this machine): HTTP on 3300, SSH on 2222 (both non-default to
|
|
# avoid clashing with other local services / the eventual Oracle box's :22).
|
|
# Production (Oracle ARM box): see deploy/RUNBOOK.md — same compose file,
|
|
# Cloudflare Tunnel in front of HTTP, SSH opened on a non-22 port in the
|
|
# box's security list.
|
|
#
|
|
# Usage:
|
|
# cd apps/rithub-server
|
|
# cp .env.example .env # fill in secrets (or export them)
|
|
# docker compose up -d
|
|
# docker compose exec app gitea admin user create --admin \
|
|
# --username <name> --password <pass> --email <email>
|
|
# (or, on the box, the rit-admin wrapper: rit-admin user create --admin ...)
|
|
|
|
name: rithub-server
|
|
|
|
services:
|
|
postgres:
|
|
container_name: rithub-server-postgres
|
|
image: postgres:17
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: gitea
|
|
POSTGRES_PASSWORD: ${RIT_DB_PASSWORD:-gitea}
|
|
POSTGRES_DB: gitea
|
|
volumes:
|
|
- gitea-pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "${RIT_DB_HOST_PORT:-5433}:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U gitea -d gitea"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
app:
|
|
container_name: rithub-server-app
|
|
image: gitea/gitea:${RIT_IMAGE_TAG:-1.23}
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
USER_UID: 1000
|
|
USER_GID: 1000
|
|
# --- identity / branding -------------------------------------------------
|
|
# APP_NAME has no [section] in app.ini (it's a top-of-file root key), so
|
|
# the environment-to-ini mapping uses an empty section segment:
|
|
# GITEA + "__" + "" + "__" + APP_NAME.
|
|
# 2026-11-17: dropped "(by Railyard)" per owner's Apple-design pass —
|
|
# one short product name only, no parenthetical attribution in the
|
|
# UI itself (it's still visible everywhere it belongs: OG tags,
|
|
# footer, SEO pages).
|
|
GITEA____APP_NAME: "Rithub"
|
|
# 2026-11-17 (PH launch day -1): stock engine boilerplate ("Gitea (Git
|
|
# with a cup of tea) is a painless self-hosted Git service written in
|
|
# Go") was still rendering in <meta name="description">, og:description
|
|
# and twitter:description on every non-repo page (home, explore,
|
|
# register, etc.) -- exactly what Product Hunt/Google/X/LinkedIn link
|
|
# previews show. Root cause: setting.UI.Meta.{Author,Description,
|
|
# Keywords} (modules/setting/ui.go) default to the stock boilerplate
|
|
# strings and are only overridable via app.ini's [ui.meta] section --
|
|
# there is no template-level override point (templates/base/head.tmpl
|
|
# and head_opengraph.tmpl both read {{MetaAuthor}}/{{MetaDescription}}/
|
|
# {{MetaKeywords}}, which call straight into this setting). A dotted
|
|
# section name must be hex-escaped in the GITEA__ env-var form: "." ->
|
|
# "_0x2E_" (confirmed against the engine's own config_env_test.go, e.g.
|
|
# LOG_0x2E_CONSOLE__STDERR -> section "log.console"), so "ui.meta"
|
|
# becomes "ui_0x2E_meta" below. This is the officially-supported
|
|
# app.ini key, not a template hack -- it also fixes og:description/
|
|
# twitter:description for free since head_opengraph.tmpl's non-repo
|
|
# branch already reads the same {{MetaDescription}} value (see this
|
|
# repo's own templates/base/head_opengraph.tmpl, non-repo branch).
|
|
GITEA__ui_0x2E_meta__AUTHOR: "Rithub"
|
|
GITEA__ui_0x2E_meta__DESCRIPTION: "Rithub — your own code host. Move from GitHub in 5 minutes."
|
|
GITEA__ui_0x2E_meta__KEYWORDS: "git hosting,github alternative,code host,rithub,move from github"
|
|
# Drop the stock "Powered by Gitea" / "Page: Xms Template: Xms"
|
|
# footer line (noisy, unbranded, not part of the Apple design pass) —
|
|
# the footer no longer names the underlying engine at all (owner ask,
|
|
# 2026-11-17/2026-12-01), so this isn't losing a license credit, just
|
|
# the debug-grade timing line and the duplicate credit. LICENSE/NOTICE
|
|
# still carry the real MIT attribution.
|
|
GITEA__other__SHOW_FOOTER_TEMPLATE_LOAD_TIME: "false"
|
|
GITEA__other__SHOW_FOOTER_POWERED_BY: "false"
|
|
GITEA__other__SHOW_FOOTER_VERSION: "false"
|
|
# NOTE 2026-11-25: live domain is rithub.dev (renamed from the
|
|
# original git.ereboslab.com deploy in deploy/RUNBOOK.md, a dated
|
|
# historical record left as-is). Defaults below match production
|
|
# (railyard-box's real .env already sets these; these are only the
|
|
# fallback if no .env is present).
|
|
GITEA__server__DOMAIN: ${RIT_DOMAIN:-rithub.dev}
|
|
GITEA__server__ROOT_URL: ${RIT_ROOT_URL:-https://rithub.dev/}
|
|
# SSH_DOMAIN is deliberately a SEPARATE var from DOMAIN/ROOT_URL above:
|
|
# DOMAIN is the Cloudflare-proxied (orange-cloud) public hostname, and
|
|
# Cloudflare's proxy only forwards HTTP(S) (80/443) -- it does not
|
|
# forward arbitrary TCP ports like 2222, so a clone URL built from
|
|
# DOMAIN (ssh://git@rithub.dev:2222/...) times out for every end user
|
|
# even once the OCI security list + UFW allow 2222 inbound.
|
|
# Point this at a DNS-only (grey-cloud) A/AAAA record for the same box
|
|
# instead (git-ssh.rithub.dev) -- confirmed by a real SSH push:
|
|
# hostname-through-Cloudflare timed out, the box's raw IP and the
|
|
# grey-cloud hostname both worked (same pattern first found 2026-10-25
|
|
# under the ereboslab.com name, re-confirmed 2026-11-25 under
|
|
# rithub.dev while fixing the HTTP 413 big-repo push failures).
|
|
GITEA__server__SSH_DOMAIN: ${RIT_SSH_DOMAIN:-git-ssh.rithub.dev}
|
|
# SSH_PORT is the port advertised in clone URLs / the UI; the container
|
|
# itself always listens on :22 via the base image's passthrough OpenSSH
|
|
# (the default — do NOT also set START_SSH_SERVER=true, the engine's
|
|
# own built-in SSH server, or the two fight over :22 and crash-loop).
|
|
GITEA__server__SSH_PORT: ${RIT_SSH_PUBLIC_PORT:-2222}
|
|
GITEA__server__HTTP_PORT: "3000"
|
|
GITEA__server__DISABLE_SSH: "false"
|
|
GITEA__server__LFS_START_SERVER: "true"
|
|
# --- database -------------------------------------------------------------
|
|
# Role/db names (gitea/gitea) and the postgres service's new name
|
|
# (postgres, was gitea-postgres) — host below matches the renamed
|
|
# service; the role/db literals stay "gitea" (see header note).
|
|
GITEA__database__DB_TYPE: postgres
|
|
GITEA__database__HOST: postgres:5432
|
|
GITEA__database__NAME: gitea
|
|
GITEA__database__USER: gitea
|
|
GITEA__database__PASSWD: ${RIT_DB_PASSWORD:-gitea}
|
|
# RIT-ACT 2026-11-30: cap the engine's own pool so a crawler burst can't
|
|
# eat every Postgres connection and make login/signup flaky (found
|
|
# live: "pq: sorry, too many clients already" during a bot-crawl
|
|
# spike). Postgres' own max_connections raised 100->150 on the box
|
|
# for headroom (not tracked here, server-side only).
|
|
GITEA__database__MAX_OPEN_CONNS: "25"
|
|
GITEA__database__MAX_IDLE_CONNS: "10"
|
|
GITEA__database__CONN_MAX_LIFETIME: 3h
|
|
# --- secrets (required in production; generate with
|
|
# `docker compose run --rm app gitea generate secret SECRET_KEY` /
|
|
# `... INTERNAL_TOKEN`, or the rit-admin wrapper on the box) --------
|
|
GITEA__security__SECRET_KEY: ${RIT_SECRET_KEY:-dev-only-secret-key-change-me}
|
|
GITEA__security__INTERNAL_TOKEN: ${RIT_INTERNAL_TOKEN:-dev-only-internal-token-change-me}
|
|
# DB/branding are fully supplied above; skip the interactive install
|
|
# wizard and boot straight into normal run mode.
|
|
GITEA__security__INSTALL_LOCK: "true"
|
|
# Already live on railyard-box's app.ini (not previously committed
|
|
# here) -- a renamed remember-me cookie, distinct from the session
|
|
# cookie below. Committing it so a fresh box/volume matches.
|
|
GITEA__security__COOKIE_REMEMBER_NAME: "rithub_remember"
|
|
# RIT-RET 2026-11-30: how many days a "remembered" login (the
|
|
# `remember=on` hidden field our signin_inner.tmpl override always
|
|
# sends -- see custom/templates/user/auth/signin_inner.tmpl -- stays
|
|
# signed in before the engine forces a fresh username/password).
|
|
# Default is 31; set explicitly to 30 per owner ask. This is
|
|
# independent of SESSION_LIFE_TIME below (that's the inactive-session
|
|
# GC window; this is the remember-me cookie's own expiry) -- confirmed
|
|
# against go-gitea/gitea v1.23.8's custom/conf/app.example.ini,
|
|
# [security] section (`;LOGIN_REMEMBER_DAYS = 31`), not [session].
|
|
GITEA__security__LOGIN_REMEMBER_DAYS: "30"
|
|
# --- sessions (RIT-OPS 2026-11-30): committing the session fix here
|
|
# so a fresh box/volume gets it automatically instead of relying on
|
|
# the one-off manual app.ini edit made directly on railyard-box
|
|
# (backup left at /data/gitea/conf/app.ini.bak-20261130-session).
|
|
# Root cause was PROVIDER defaulting to "memory" -- every container
|
|
# restart (e.g. a template/theme deploy) wiped all sessions and
|
|
# logged every real user out. "db" reuses the [database] block
|
|
# already set above (Postgres), so sessions survive restarts.
|
|
# SESSION_LIFE_TIME is in SECONDS (not days, unlike LOGIN_REMEMBER_DAYS
|
|
# above) -- 604800 = 7 days, matching the box's live fix. COOKIE_NAME
|
|
# is also already live on the box (renamed from the engine's stock
|
|
# "i_like_gitea"); committing it here too for the same reason.
|
|
GITEA__session__PROVIDER: "db"
|
|
GITEA__session__SESSION_LIFE_TIME: "604800"
|
|
GITEA__session__COOKIE_SECURE: "true"
|
|
GITEA__session__SAME_SITE: "lax"
|
|
GITEA__session__COOKIE_NAME: "rithub_session"
|
|
# --- packages / LFS / wiki / actions (the Dec 21/28 roadmap scope) --------
|
|
GITEA__packages__ENABLED: "true"
|
|
GITEA__packages__LIMIT_TOTAL_OWNER_COUNT: "-1"
|
|
GITEA__repository__DISABLE_DOWNLOAD_SOURCE_ARCHIVES: "false"
|
|
GITEA__repository__DEFAULT_PRIVATE: "private"
|
|
GITEA__actions__ENABLED: "true"
|
|
GITEA__actions__DEFAULT_ACTIONS_URL: github
|
|
# --- migrations: one-click "Import from GitHub" (/repo/migrate) ----------
|
|
# 2026-11-17 (wave7): this section was ABSENT entirely, which per
|
|
# the engine's own docs means ALLOWED_DOMAINS defaults to blank == every
|
|
# domain allowed, not just github.com -- the live migrate form could
|
|
# already hit any http(s) URL the signed-in user typed, a real SSRF
|
|
# surface (internal railyard-box services, cloud metadata endpoints,
|
|
# etc.) that nobody had scoped down yet. First attempt used literal
|
|
# "github.com" only -- a real live test caught that the engine's GitHub
|
|
# migrator actually dials api.github.com (metadata/issues/PRs) and
|
|
# codeload.github.com (archive downloads) as separate hostnames, so
|
|
# an exact match alone 500'd every real import ("migration can only
|
|
# call allowed HTTP servers ... deny 'api.github.com'"). Glob
|
|
# wildcards fixed it. Confirmed live end-to-end after this change: a
|
|
# real github.com/octocat/Hello-World migration succeeds (3 commits,
|
|
# 3 branches); the same flow against gitlab.com now fails fast with
|
|
# the engine's own "You can not import from disallowed hosts" 422
|
|
# instead of ever issuing the fetch.
|
|
# 2026-11-30 (RIT-ACT, owner correction): the "Bring your code" screen's
|
|
# "Import from URL" tile claims it works for "github.com, gitlab.com,
|
|
# codeberg.org, bitbucket.org or any git URL" -- caught live (a real
|
|
# gitlab.com/pages/plain-html.git import 422'd with the same
|
|
# "disallowed hosts" error above) that this allowlist only ever
|
|
# covered GitHub, making that claim false for the other 3 named
|
|
# hosts. Added gitlab.com/codeberg.org/bitbucket.org + their
|
|
# wildcard subdomains -- NOT opened to arbitrary domains: the
|
|
# 2026-11-17 SSRF hardening this allowlist exists for stays intact,
|
|
# so a "plain https git URL" to an unlisted host still 422s fast
|
|
# (same safe failure as before) instead of ever issuing a fetch.
|
|
# This is a deliberate, disclosed tradeoff, not a bug: the screen's
|
|
# copy says "github.com, gitlab.com, codeberg.org, bitbucket.org or
|
|
# any git URL" meaning any URL *on* those hosts, not any host at
|
|
# all -- flagged in plans/railyard.md so it's not silently narrower
|
|
# than it reads.
|
|
GITEA__migrations__ALLOWED_DOMAINS: "github.com,*.github.com,*.githubusercontent.com,gitlab.com,*.gitlab.com,bitbucket.org,*.bitbucket.org,codeberg.org,*.codeberg.org"
|
|
GITEA__migrations__ALLOW_LOCALNETWORKS: "false"
|
|
# --- accounts: native engine auth, or Railyard SSO once registered -------
|
|
# CLOSED (backlog item 5, was TODO(railyard-sso)): apps/console now
|
|
# exposes a real OIDC discovery endpoint (lib/oidc.ts, /oidc/{authorize,
|
|
# token,userinfo,jwks}). Register it once RAILYARD_OIDC_SIGNING_KEY and
|
|
# RAILYARD_OIDC_CLIENTS (client_id "railyard-id" below) are set on
|
|
# console:
|
|
# docker compose exec app gitea admin auth add-oauth \
|
|
# --name railyard-id --provider openidConnect \
|
|
# --key railyard-id --secret <the RAILYARD_OIDC_CLIENTS secret> \
|
|
# --auto-discover-url https://railyard.ereboslab.com/.well-known/openid-configuration \
|
|
# --group-claim-name groups --admin-group railyard-admins
|
|
# The redirect_uri the engine will present is
|
|
# <RIT_ROOT_URL>user/oauth2/railyard-id/callback -- it must exactly
|
|
# match the redirect_uri configured for "railyard-id" in console's
|
|
# RAILYARD_OIDC_CLIENTS. Native accounts stay available alongside this;
|
|
# the webhook-bridge billing hook (integrations/railyard/) is unaffected
|
|
# either way.
|
|
# 2026-11-17: default flipped to open (was accidentally left "true" in
|
|
# the box's .env, silently blocking every "Move from GitHub" signup —
|
|
# nobody but the admin could ever get a Rithub account).
|
|
# REGISTER_EMAIL_CONFIRM stays false even with the mailer on below
|
|
# (RIT-ACT 2026-11-30): a brand-new visitor must land logged in on
|
|
# their dashboard in one step; email is for password-reset / notices
|
|
# only, never a login gate. Built-in Turnstile captcha is the anti-spam
|
|
# gate.
|
|
GITEA__service__DISABLE_REGISTRATION: ${RIT_DISABLE_REGISTRATION:-false}
|
|
GITEA__service__REGISTER_EMAIL_CONFIRM: "false"
|
|
GITEA__service__ENABLE_CAPTCHA: "true"
|
|
GITEA__service__CAPTCHA_TYPE: ${RIT_CAPTCHA_TYPE:-cfturnstile}
|
|
GITEA__service__CF_TURNSTILE_SITEKEY: ${RIT_CF_TURNSTILE_SITEKEY:-}
|
|
GITEA__service__CF_TURNSTILE_SECRET: ${RIT_CF_TURNSTILE_SECRET:-}
|
|
GITEA__service__REQUIRE_CAPTCHA_FOR_LOGIN: "false"
|
|
GITEA__openid__ENABLE_OPENID_SIGNIN: "false"
|
|
# Mailer (RIT-ACT 2026-11-30): routed through the shared OCI Email
|
|
# Delivery relay via the already-approved "team@go.rithub.dev" sender
|
|
# (see gtm/outbound/CAPACITY-2026-11-25.md) -- not Resend, per the
|
|
# standing "use Scribase/OCI relay, not Resend" rule. Enables
|
|
# /user/forgot_password (was 404 with the mailer off) and the
|
|
# post-signup/activation notice. Values live only in the box's real
|
|
# .env (gitignored), never here.
|
|
GITEA__mailer__ENABLED: ${RIT_MAILER_ENABLED:-false}
|
|
GITEA__mailer__PROTOCOL: ${RIT_MAILER_PROTOCOL:-smtp+starttls}
|
|
GITEA__mailer__SMTP_ADDR: ${RIT_MAILER_SMTP_ADDR:-}
|
|
GITEA__mailer__SMTP_PORT: ${RIT_MAILER_SMTP_PORT:-587}
|
|
GITEA__mailer__USER: ${RIT_MAILER_USER:-}
|
|
GITEA__mailer__PASSWD: ${RIT_MAILER_PASSWD:-}
|
|
GITEA__mailer__FROM: ${RIT_MAILER_FROM:-Rithub <team@go.rithub.dev>}
|
|
# --- Sign in with GitHub/Google/Apple (2026-11-18) ------------------
|
|
# Sources themselves are added via `gitea admin auth add-oauth` (the
|
|
# rit-admin wrapper on the box), not app.ini (the engine has no
|
|
# app.ini key to declare an OAuth2 source) -- see
|
|
# apps/rithub-server/scripts/add-rithub-oauth-sources.sh, run on
|
|
# railyard-box reading /etc/products/rithub-oauth.env (owner-filled,
|
|
# root-only). These two keys are the app.ini side: a first OAuth
|
|
# login creates the Rithub account directly (no separate sign-up
|
|
# form), and auto-links to an existing native account on matching
|
|
# verified email instead of erroring with "email already used".
|
|
GITEA__oauth2_client__ENABLE_AUTO_REGISTRATION: "true"
|
|
GITEA__oauth2_client__ACCOUNT_LINKING: auto
|
|
networks:
|
|
default:
|
|
# act_runner persists the instance URL it registered against
|
|
# (gitea-runner-data volume's `.runner` file) and only re-reads
|
|
# GITEA_INSTANCE_URL on a FRESH volume -- found live during this
|
|
# rename: the existing runner kept dialing the old "gitea" hostname
|
|
# and crash-looped ("lookup gitea ... server misbehaving") after
|
|
# the service was renamed to "app". Aliasing "gitea" here (on top
|
|
# of the real service name "app") means the renamed container
|
|
# answers to both, so the already-registered runner keeps working
|
|
# with zero changes to its persisted state.
|
|
aliases:
|
|
- gitea
|
|
volumes:
|
|
- gitea-data:/data
|
|
# The official Docker image collapses the engine's normal "custom/"
|
|
# override dir straight into /data/gitea (CustomPath == WorkPath in
|
|
# this image, NOT /data/gitea/custom) — bind-mount only the
|
|
# public/templates/options subpaths, never the whole /data/gitea, or
|
|
# this would shadow conf/, the sqlite/log dirs and ssh host keys that
|
|
# live there too.
|
|
- ./custom/public:/data/gitea/public:ro
|
|
- ./custom/templates:/data/gitea/templates:ro
|
|
# 2026-11-18: locale override (custom/options/locale/locale_en-US.ini)
|
|
# to kill visible "Gitea" text on /repo/migrate and the repo Signing
|
|
# Verification Settings page — see plans/railyard.md PH-visitor QA
|
|
# finding #1 (HIGH), and the 2026-12-01 pass that finished scrubbing
|
|
# the rest of this file (plans/railyard.md RIT-OPS/RIT-BRD). The
|
|
# engine's locale loader does a full-file swap, not a per-key merge,
|
|
# when a custom locale file exists for a language (confirmed in
|
|
# modules/translation/translation.go + options/base.go for 1.23.8) —
|
|
# this file is a full copy of the stock en-US locale with the
|
|
# "Gitea"-literal strings edited (keys and a few real upstream
|
|
# identifiers/URLs are left alone, see the file's own history), not a
|
|
# short snippet, or every other English string on the site would go
|
|
# blank.
|
|
- ./custom/options:/data/gitea/options:ro
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
# RIT-OPS 2026-12-01: replaces the stock image's own
|
|
# /usr/local/bin/gitea entrypoint wrapper 1:1 for every subcommand
|
|
# except `serv` (the SSH git command), where it text-substitutes
|
|
# "Gitea" -> "Rithub" on stderr only -- the engine's `serv` errors
|
|
# ("Gitea: Internal Server Error (no message for end users)",
|
|
# "Gitea: Too few arguments") are a hardcoded literal in cmd/serv.go,
|
|
# not driven by APP_NAME/any ini key, and were leaking the underlying
|
|
# engine's name to every SSH git user. See deploy/entrypoint-wrapper.sh
|
|
# for the full why/how; stdout (the git pack-protocol bytes) is passed
|
|
# through a separate fd, untouched.
|
|
- ./deploy/entrypoint-wrapper.sh:/usr/local/bin/gitea:ro
|
|
ports:
|
|
- "${RIT_HTTP_HOST_PORT:-3300}:3000"
|
|
- "${RIT_SSH_HOST_PORT:-2222}:22"
|
|
|
|
# CI runner (closes the "forge CI runners" gap from
|
|
# plans/OSS-ADOPTION-2026-10-15.md — the engine's built-in Actions covers
|
|
# the pipeline definition/UI, this is what actually *executes* a pushed
|
|
# `.gitea/workflows/*.yml` job; without it the Actions tab is cosmetic).
|
|
# `profiles: [actions]` keeps this out of a bare `docker compose up -d`
|
|
# (it must be started by name: `docker compose up -d act_runner`) — a
|
|
# fresh clone/box must never fail to bring up app+postgres just because
|
|
# a runner token doesn't exist yet. Requires a one-time registration token:
|
|
# docker compose exec -u git app gitea actions generate-runner-token
|
|
# then put it in .env as RIT_RUNNER_TOKEN before the up -d above. Token
|
|
# is consumed on first boot: act_runner persists its signed credentials in
|
|
# the gitea-runner-data volume (`.runner` file) and reconnects with those
|
|
# on every restart, so the token env var is only read once per fresh
|
|
# volume. Starting this with RIT_RUNNER_TOKEN still unset/blank is safe
|
|
# (no required-var interpolation failure that could block the rest of the
|
|
# stack) — act_runner just exits/restarts with a clear "no token" error
|
|
# until a real one is set.
|
|
act_runner:
|
|
container_name: rithub-server-act-runner
|
|
image: gitea/act_runner:${ACT_RUNNER_IMAGE_TAG:-0.6.1}
|
|
profiles: ["actions"]
|
|
restart: unless-stopped
|
|
depends_on: [app]
|
|
environment:
|
|
# GITEA_INSTANCE_URL / GITEA_RUNNER_REGISTRATION_TOKEN / GITEA_RUNNER_NAME
|
|
# are the act_runner binary's own hardcoded env var names (gitea/act_runner
|
|
# image, not under our control — same exception class as the app
|
|
# service's GITEA__ keys above). Internal compose-network hostname,
|
|
# not the public HTTPS URL — the runner calls the engine's gRPC/HTTP
|
|
# registration+task API directly inside the shared docker network, so
|
|
# it doesn't depend on the public DNS name, TLS termination, or
|
|
# Cloudflare being reachable from the box's own loopback. Override
|
|
# only if act_runner runs on a different host than the app container
|
|
# (e.g. a dedicated runner box).
|
|
GITEA_INSTANCE_URL: ${ACT_RUNNER_INSTANCE_URL:-http://app:3000}
|
|
GITEA_RUNNER_REGISTRATION_TOKEN: ${RIT_RUNNER_TOKEN:-}
|
|
GITEA_RUNNER_NAME: ${RIT_RUNNER_NAME:-railyard-box}
|
|
# No CONFIG_FILE: act_runner runs fine on its built-in defaults from
|
|
# just the env vars above (DooD via the mounted socket, default
|
|
# `ubuntu-latest`-style labels) — a mounted config.yaml is only
|
|
# needed to override those defaults, which nothing here requires yet.
|
|
volumes:
|
|
- gitea-runner-data:/data
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
volumes:
|
|
# Pinned to the EXACT existing Docker volume names (railyard-box: `docker
|
|
# volume ls` showed railyard-gitea_gitea-{pgdata,data,runner-data}, the
|
|
# old project-name-prefixed names from before this rename). Without this
|
|
# explicit `name:` override, compose would derive new volume names from
|
|
# the `name: rithub-server` project field above and attach to brand-new,
|
|
# EMPTY volumes on the next `up -d` -- silently wiping every repo, user
|
|
# and session. Confirmed via `docker compose config` resolving to the
|
|
# same prefixed names before this file's own project-name field was
|
|
# changed, kept pinned here on purpose rather than relying on prefix
|
|
# matching again if the project name ever changes again.
|
|
gitea-pgdata:
|
|
name: railyard-gitea_gitea-pgdata
|
|
gitea-data:
|
|
name: railyard-gitea_gitea-data
|
|
gitea-runner-data:
|
|
name: railyard-gitea_gitea-runner-data
|