Files
jeremy 78b824bb39 fix: pin gitea to 1.26.1 and disable Watchtower to prevent broken image pulls
Watchtower pulled gitea/gitea:latest three times (Mar 12, Apr 19, Apr 25)
and at least one pull resulted in a broken image with git binary failures.
Pin to stable gitea/gitea:1.26.1 and add watchtower.enable=false label
so the image is only updated by deliberate human action.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 16:17:15 -05:00

75 lines
1.8 KiB
YAML

services:
gitea:
image: gitea/gitea:1.26.1
container_name: gitea
restart: unless-stopped
labels:
- "com.centurylinklabs.watchtower.enable=false"
ports:
- "3003:3000"
- "2222:22"
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=${GITEA_DB_PASSWORD}
- GITEA__server__SSH_PORT=2222
volumes:
- /mnt/docker-data/configs/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
gitea-db:
condition: service_healthy
networks:
- gitea-internal
mem_limit: 512M
memswap_limit: 512M
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/api/healthz || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
gitea-db:
image: postgres:16-alpine
container_name: gitea-db
restart: unless-stopped
user: "1024:100"
environment:
- POSTGRES_DB=gitea
- POSTGRES_USER=gitea
- POSTGRES_PASSWORD=${GITEA_DB_PASSWORD}
volumes:
- /mnt/docker-data/databases/gitea-db:/var/lib/postgresql/data
networks:
- gitea-internal
labels:
- "com.centurylinklabs.watchtower.enable=false"
mem_limit: 256M
memswap_limit: 256M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U gitea -d gitea"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
networks:
gitea-internal:
driver: bridge