Move gitea/ to its own repo, adamf/stpgit
Test and deploy / test (push) Successful in 21s
Test and deploy / deploy (push) Successful in 13s

The Gitea LXC's compose file, entrypoint, app.ini template and env example
now live in adamf/stpgit, which the LXC checks out instead of this repo.
What stays here is stpvm's side: the haproxy forwarder, renamed to
gitea-forwarder/haproxy.cfg, and a copy of the entrypoint in
.deprecated/gitea/ so the stpvm rollback does not depend on the new repo.
Renovate now also covers adamf/stpgit, and the docs point there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-24 16:52:55 +00:00
co-authored by Claude Opus 5.5
parent fc777ba8b2
commit bb83c6bb03
15 changed files with 41 additions and 374 deletions
+50
View File
@@ -0,0 +1,50 @@
# =============================================================================
# gitea-forwarder/haproxy.cfg — haproxy config for the `gitea` service on stpvm.
#
# Gitea itself runs in its own LXC (the adamf/stpgit repo). This forwards
# stpvm's Gitea ports to it, unchanged, at the TCP level:
# :3000 HTTP — Caddy's /gitea/ and /v2/ routes, the backend's activity
# feed and usaco's pulls reach it as gitea:3000 on
# app-network; the runner and Renovate as localhost:3000.
# :2222 SSH — every repo's CI (ssh://git@localhost:2222), the obsidian
# checkout and silverbullet-git (DOMAIN:2222, pinned to this
# host), and laptops using stpvm's tailnet name.
# So nothing that talked to Gitea on stpvm had to change address.
#
# TCP mode, not HTTP: the bytes are passed through untouched, so Caddy's
# X-Forwarded-For still reaches Gitea (which trusts one hop of it), SSH just
# works, and there is no second body-size limit on registry uploads.
#
# GITEA_UPSTREAM is the LXC's LAN IP, set in the site's .env. An IP and not a
# name: Docker's DNS cannot see tailnet or LAN names.
# =============================================================================
global
log stdout format raw local0 notice
defaults
mode tcp
log global
option tcplog
timeout connect 5s
# Inactivity timeouts, not total ones. A large clone or image layer upload
# keeps bytes moving; an idle `git` waiting on a slow server-side pack
# should not be cut off at a minute, so these are generous.
timeout client 1h
timeout server 1h
# Start even if the upstream does not resolve yet (dev has no Gitea at
# all); connections then fail rather than the container.
default-server init-addr last,libc,none
frontend http
bind :3000
default_backend gitea_http
frontend ssh
bind :2222
default_backend gitea_ssh
backend gitea_http
server gitea "${GITEA_UPSTREAM}:3000"
backend gitea_ssh
server gitea "${GITEA_UPSTREAM}:2222"