mirror of
https://github.com/runyanjake/olomana.git
synced 2026-03-26 05:53:17 -07:00
Gitea
Self-hosted git server backed by PostgreSQL, proxied through Traefik.
Services
| Service | Image | Purpose |
|---|---|---|
server |
gitea/gitea:latest |
Gitea web/git server |
database |
postgres:14 |
PostgreSQL database |
Data is persisted to /pwspool/software/gitea/ on the host.
Setup
1. Configure environment
Copy the example env files and fill in values:
cp gitea.env.example gitea.env
cp database.env.example database.env
gitea.env— Gitea app config (domain, SSH settings, DB credentials, etc.)database.env— PostgreSQL credentials
See the Gitea config cheat sheet for all available options.
2. Start the stack
docker compose up -d
3. Complete initial setup
Navigate to https://git.whitney.rip and complete the web installer. Values should match what's in gitea.env. A few known quirks:
- PostgreSQL must use the default port (5432); other ports may fail.
- Use
databaseas the database hostname (matches the service name indocker-compose.yml). - The first admin account can be created during initial setup or by enabling registrations temporarily via
GITEA__service__DISABLE_REGISTRATION=false.
4. Provision users
From the admin account: Site Administration > User Accounts > Create User Account.
5. Configure SSH
SSH is exposed via Traefik TCP passthrough on port 2222:
- The
giteaentrypoint on:2222is defined intraefik.toml. - TCP router labels in
docker-compose.ymlforward2222→ container port2222. SSH_DOMAINandSSH_PORT=2222ingitea.envtell Gitea what to advertise in clone URLs.
Test SSH:
ssh -T -p 2222 git@git.whitney.rip
6. Add SSH keys for users
Settings > SSH/GPG Keys > Manage SSH Keys — same flow as GitHub.
Running
docker compose down && docker compose build && docker compose up -d && docker logs -f gitea