Some checks failed
Deploy Application / deploy (push) Has been cancelled
2.1 KiB
2.1 KiB
Gitea Stack
Self-hosted Git Server mit PostgreSQL Backend und Redis Cache.
Features
- Gitea Git Server
- PostgreSQL 16 als Datenbank-Backend
- Redis 7 für Cache und Sessions
- Traefik Integration für SSL
- Persistent Volumes für Daten
Voraussetzungen
- Traefik Stack muss laufen (für SSL)
- Infrastructure Network muss existieren
- DNS-Eintrag für
git.michaelschiemer.de
Setup
1. Infrastructure Network erstellen
docker network create infrastructure
2. Secrets erstellen
# PostgreSQL Passwort für Gitea
openssl rand -base64 32 > secrets/postgres_password.txt
chmod 600 secrets/postgres_password.txt
# Redis Passwort
openssl rand -base64 32 > secrets/redis_password.txt
chmod 600 secrets/redis_password.txt
3. Stack deployen
docker compose up -d
4. Initial Setup
Nach dem ersten Start:
- Öffne https://git.michaelschiemer.de
- Führe das Initial Setup durch
- Erstelle Admin-User
Networks
traefik-public:
- Externes Network (von Traefik erstellt)
- Für externe Zugriffe via Traefik
infrastructure:
- Externes Network (muss vorher erstellt werden)
- Für interne Kommunikation zwischen Gitea, PostgreSQL und Redis
Volumes
gitea-data- Gitea-Daten (Repositories, Konfiguration)gitea-postgres-data- PostgreSQL-Daten für Giteagitea-redis-data- Redis-Daten für Gitea
Konfiguration
Gitea-Konfiguration wird in /data/gitea/conf/app.ini gespeichert.
Für Änderungen:
docker compose exec gitea vi /data/gitea/conf/app.ini
docker compose restart gitea
Troubleshooting
Gitea startet nicht
# Logs prüfen
docker compose logs -f gitea
# PostgreSQL-Verbindung prüfen
docker compose exec postgres pg_isready -U gitea
SSL-Zertifikat wird nicht erstellt
- Prüfe Traefik-Logs
- Prüfe DNS-Eintrag für
git.michaelschiemer.de - Prüfe Traefik Labels
Redis-Verbindungsprobleme
# Redis-Logs prüfen
docker compose logs redis
# Redis-Verbindung testen
docker compose exec redis redis-cli -a $(cat secrets/redis_password.txt) ping