# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # 🚀 BUILT & MAINTAINED BY THE ALTSTACK # 🌍 https://thealtstack.com # 💡 Open-source deployment templates for modern self-hosting. # ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ version: '3.8' services: server: image: gitea/gitea:latest container_name: gitea restart: unless-stopped depends_on: - db ports: - "3000:3000" - "222:22" environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=db:5432 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=gitea volumes: - ./data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro db: image: postgres:14-alpine container_name: gitea-db restart: unless-stopped environment: - POSTGRES_USER=gitea - POSTGRES_PASSWORD=gitea - POSTGRES_DB=gitea volumes: - gitea_db:/var/lib/postgresql/data volumes: gitea_db: