version: '3.8' # Gitea - Self-Hosted Git Service # Application Layer # Ports: 3002 (HTTP), 2222 (SSH) # GPU: No # Storage: SSD (repositories) # Database: postgres-shared (gitea database, gitea_user) services: 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=postgres-shared:5432 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea_user - GITEA__database__PASSWD=cCav64d76NX1zdEEAbVOM9uvao14aY8HojjNdxsSpMM= - 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 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 # Database: Uses postgres-shared stack (gitea database, gitea_user) # Ensure postgres-shared is running before deploying this stack. # # Access: http://localhost:3002 or https://git.schweitz.net (via NPM) # # 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