Files
app-catalog-felhom.eu/templates/gitea/docker-compose.yml
T
admin 17e00b788e gitea: fix healthcheck — probe /api/healthz (was 404 on /api/v1/version pre-install)
Surfaced during the unattended deploy sweep: a fresh gitea reported unhealthy because
the HC hit /api/v1/version (404 until install-lock); /api/healthz returns 200 while
serving. Fixed both the docker HC and the controller .felhom.yml probe; bumped
start_period to 90s for first-boot DB migration. Same class as the komga fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 15:17:52 +02:00

50 lines
1.6 KiB
YAML

# Gitea - Könnyű, saját Git szerver webes felülettel
# Domain: ${SUBDOMAIN}.${DOMAIN}
# Database: None (file-based)
# RAM: ~100M (mem_limit: 512M) | Pi-compatible: Yes
#
# Environment variables:
# DOMAIN - Your domain (e.g., demo-felhom.eu)
services:
gitea:
image: gitea/gitea:1.23.4
container_name: gitea
restart: unless-stopped
environment:
- TZ=Europe/Budapest
- GITEA__server__ROOT_URL=https://${SUBDOMAIN}.${DOMAIN}
- GITEA__server__SSH_DOMAIN=${SUBDOMAIN}.${DOMAIN}
- GITEA__database__DB_TYPE=sqlite3
volumes:
- gitea_data:/data
networks:
- traefik-public
deploy:
resources:
limits:
memory: 512M
# /api/healthz is gitea's dedicated health endpoint (200 once serving); /api/v1/version returns
# 404 until the install wizard is completed (INSTALL_LOCK), so it falsely reported unhealthy on a
# fresh deploy. The gitea image ships curl (verified). 90s start_period covers first-boot DB migration.
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 90s
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls=true"
- "traefik.http.routers.gitea.tls.certresolver=letsencrypt"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
volumes:
gitea_data:
networks:
traefik-public:
external: true