Files
homelab-infra/core/gitea/docker-compose.yml
T
Micha 3daea94982 Add healthcheck to Gitea (/api/healthz)
Gitea exposes /api/healthz unauthenticated. 60s start_period
because Gitea sqlite migration on cold start can take a while.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 15:09:51 +02:00

47 lines
1.5 KiB
YAML

services:
gitea:
image: docker.gitea.com/gitea:1.25.4@sha256:17d18218be2dad1f8ed402a4f906989505c90ab8b66ee9befcecfb5d470133e7
container_name: gitea
restart: unless-stopped
security_opt:
- no-new-privileges:true
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__server__DOMAIN=git.kaleschke.info
- GITEA__server__ROOT_URL=https://git.kaleschke.info/
- GITEA__database__DB_TYPE=sqlite3
- GITEA__service__DISABLE_REGISTRATION=true
- GITEA__service__REGISTER_EMAIL_CONFIRM=true
- GITEA__openid__ENABLE_OPENID_SIGNIN=false
- GITEA__openid__ENABLE_OPENID_SIGNUP=false
- GITEA__migrations__ALLOWED_DOMAINS=github.com
- GITEA__webhook__ALLOWED_HOST_LIST=komodo-core,localhost,127.0.0.1,192.168.178.0/24
volumes:
- /mnt/user/services/gitea/data:/data
dns:
- 1.1.1.1
- 8.8.8.8
ports:
- "222:22"
networks:
- frontend_net
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:3000/api/healthz || exit 1"]
interval: 30s
timeout: 5s
retries: 5
start_period: 60s
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend_net"
- "traefik.http.routers.gitea.rule=Host(`git.kaleschke.info`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls=true"
- "traefik.http.routers.gitea.tls.certresolver=le"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
networks:
frontend_net:
external: true