Files
portainer-core/stacks/gitea.yml
T
jpmschweitzerandClaude Opus 4.5 75c3950dd8 feat: add Docker healthchecks, remove Uptime Kuma
- Add healthcheck configurations to 13 stacks for Portainer status monitoring
- Remove Uptime Kuma service (replaced by Docker healthchecks)
- Clean up stale Heimdall references
- Update documentation and service counts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 12:05:05 +01:00

129 lines
3.7 KiB
YAML

version: '3.8'
# Gitea - Self-Hosted Git Service with Database
# Application Layer
# Ports: 3002 (HTTP), 2222 (SSH)
# GPU: No
# Storage: SSD (repositories, database)
services:
gitea-db:
image: postgres:14-alpine
container_name: gitea-db
restart: unless-stopped
volumes:
# Database on SSD for performance
- /home/jpmschweitzer/docker-data/gitea/db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=gPdM7QV4gvotE9f9lGS4yj
- POSTGRES_DB=gitea
- TZ=Europe/Amsterdam
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gitea -d gitea"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
networks:
- docker-dataplane
gitea:
image: gitea/gitea:latest
container_name: gitea
restart: unless-stopped
ports:
- "3002:3000" # HTTP web interface
- "2222:22" # SSH git access (mapped to avoid host SSH conflict)
volumes:
# Git repositories and app config on SSD
- /home/jpmschweitzer/docker-data/gitea/data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=gitea-db:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=gitea
- GITEA__database__PASSWD=gPdM7QV4gvotE9f9lGS4yj
- TZ=Europe/Amsterdam
healthcheck:
test: ["CMD-SHELL", "curl -fSs http://git.schweitz.internal/api/healthz || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
depends_on:
- gitea-db
networks:
- docker-dataplane
gitea-runner:
image: gitea/act_runner:latest
container_name: gitea-runner
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/jpmschweitzer/docker-data/gitea/runner:/data
environment:
- CONFIG_FILE=/data/config.yaml
- GITEA_INSTANCE_URL=http://gitea:3000
- GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_TOKEN}
- GITEA_RUNNER_NAME=docker-runner
- TZ=Europe/Amsterdam
healthcheck:
test: ["CMD-SHELL", "pgrep -x act_runner || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
- gitea
networks:
- docker-dataplane
networks:
docker-dataplane:
external: true
name: docker-dataplane
# ⚠️ SECURITY WARNING:
# Change POSTGRES_PASSWORD and GITEA__database__PASSWD before deploying!
# Use a strong, unique password.
#
# After Deployment:
# 1. Access http://localhost:3002
# 2. First-time setup:
# - Server domain: localhost:3002 or your domain
# - SSH server domain: localhost
# - SSH server port: 2222 (external)
# - HTTP listen port: 3000 (internal)
# - Application URL: http://localhost:3002 or https://git.schweitz.net (if using NPM)
# - Database: PostgreSQL (pre-configured via environment variables)
# - Create admin account (strong password!)
# 3. Configure additional settings:
# - Email settings (optional)
# - Enable/disable user registration
# - Configure webhooks and integrations
#
# SSH Git Clone Usage:
# git clone ssh://git@localhost:2222/username/repo.git
#
# Nginx Proxy Manager Setup (for external access):
# 1. Add proxy host: git.schweitz.net → http://gitea:3000
# 2. Enable SSL with Let's Encrypt
# 3. Update GITEA__server__ROOT_URL in environment to https://git.schweitz.net
#
# Features:
# - Git repository hosting
# - Organizations and teams
# - Issue tracking
# - Pull requests and code review
# - Wiki and project documentation
# - CI/CD integration (Gitea Actions)
# - Webhooks for automation
# - Migration from GitHub/GitLab
# - Lightweight and fast