services:
  gitea:
    image: gitea/gitea:1.22
    container_name: gitea
    restart: unless-stopped
    env_file:
      - /srv/gitea/env/gitea.env
    environment:
      USER_UID: "1000"
      USER_GID: "1000"
    volumes:
      - /srv/gitea/data:/data
    ports:
      - "127.0.0.1:3001:3000"
      - "2222:22"
    depends_on:
      - gitea-db

  gitea-db:
    image: postgres:15
    container_name: gitea-db
    restart: unless-stopped
    env_file:
      - /srv/gitea/env/gitea.env
    volumes:
      - /srv/gitea/postgres:/var/lib/postgresql/data
