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]>
85 lines
4.4 KiB
YAML
85 lines
4.4 KiB
YAML
# =============================================================================
|
|
# .deprecated/gitea/docker-compose.gitea.yml — Gitea as it ran on stpvm until
|
|
# 2026-11-24, kept as the rollback from the move to its own LXC.
|
|
#
|
|
# STATUS: not live. Gitea runs on stpgit (the adamf/stpgit repo); stpvm's
|
|
# `gitea` service is an haproxy forwarder to it.
|
|
#
|
|
# This is the old service verbatim except for the two state mounts, which now
|
|
# point at the pre-move copy moved in beside this file (gitignored). Layered
|
|
# over docker-compose.yml it replaces the forwarder under the same name;
|
|
# compose merges the forwarder's GITEA_UPSTREAM and haproxy.cfg mount in
|
|
# too, and both are harmless to Gitea. Relative paths resolve against the
|
|
# project directory (the repo root), not this file. See README.md here and
|
|
# DEPLOYMENT.md §7, "Gitea LXC", for the full rollback.
|
|
# =============================================================================
|
|
services:
|
|
# Self-hosted git, served at /gitea/ and on port 3000 directly. Also the CI
|
|
# server: .gitea/workflows/deploy.yaml redeploys this whole stack on push to
|
|
# main, executed by the act_runner that lives outside docker (gitea-runner/).
|
|
#
|
|
# ROOTLESS image: runs as an unprivileged user, so config lives in /etc/gitea
|
|
# and data in /var/lib/gitea (not /data as in the root image) — that is why
|
|
# the bind mounts look unlike most Gitea compose examples.
|
|
#
|
|
# The GITEA__section__KEY environment convention is Gitea's own: each maps to
|
|
# an app.ini key and overrides the file at runtime, which is how the secrets
|
|
# stay in .env instead of in the committed app.ini.template.
|
|
#
|
|
# entrypoint is overridden to run our wrapper (which materialises app.ini
|
|
# from the template on first boot) before handing off to Gitea's real
|
|
# docker-entrypoint.sh. dumb-init is kept as PID 1 for correct signal/zombie
|
|
# handling, exactly as the stock image does it.
|
|
gitea:
|
|
image: docker.gitea.com/gitea:1.25.4-rootless
|
|
container_name: "${GITEA_HOST}"
|
|
entrypoint: ["/usr/bin/dumb-init", "--", "/etc/gitea/entrypoint.sh"]
|
|
networks:
|
|
- app-network
|
|
environment:
|
|
- GITEA__database__DB_TYPE=postgres
|
|
- GITEA__database__HOST=${POSTGRES_HOST}
|
|
- GITEA__database__NAME=${POSTGRES_GITEA_DB}
|
|
- GITEA__database__USER=${POSTGRES_USER}
|
|
- GITEA__database__PASSWD=${POSTGRES_PASSWORD}
|
|
- 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.
|
|
- GITEA__webhook__ALLOWED_HOST_LIST=external,usaco
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
restart: always
|
|
volumes:
|
|
# PERSISTENT: repositories, LFS objects, avatars, sessions. The git data
|
|
# itself. (Gitea's *relational* data is in Postgres, not here.)
|
|
- ./.deprecated/gitea/data:/var/lib/gitea
|
|
# PERSISTENT: app.ini is generated into this host directory on first boot
|
|
# and then edited by Gitea itself, so it is gitignored — only the
|
|
# template is committed.
|
|
- ./.deprecated/gitea/config:/etc/gitea
|
|
# Mounted over the config dir so the wrapper script is available at the
|
|
# path the overridden entrypoint points at.
|
|
- ./.deprecated/gitea/entrypoint.sh:/etc/gitea/entrypoint.sh:ro
|
|
# Match the Pi's clock/zone so commit and CI timestamps are local time.
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
ports:
|
|
# 2222 = Gitea's *built-in* SSH server (the rootless image cannot use 22).
|
|
# Clones use ssh://git@host:2222/... — including the deploy workflow,
|
|
# which fetches from ssh://git@localhost:2222.
|
|
- "2222:2222"
|
|
# 3000 = HTTP, published directly as well as proxied at /gitea/, because
|
|
# the act_runner registers against http://localhost:3000 from the host.
|
|
- "3000:3000"
|
|
depends_on:
|
|
- db
|