services:
  gitea:
    image: docker.gitea.com/gitea:1.24.3
    container_name: gitea
    environment:
      - USER_UID=1000
      - USER_GID=1000
      - GITEA__database__DB_TYPE=postgres
      - GITEA__database__HOST=host:11111
      - GITEA__database__NAME=gitea
      - GITEA__database__USER=gitea
      - GITEA__database__PASSWD=gitea
      - GITEA__mailer__ENABLED=true
      - GITEA__mailer__SMTP_ADDR=email-smtp.eu-west-1.amazonaws.com
      - GITEA__mailer__SMTP_PORT=587
      - GITEA__mailer__FROM=gitea@veenboer.xyz
      - GITEA__mailer__USER=${SMTP_USER:?}
      - GITEA__mailer__PASSWD=${SMTP_PASSWORD:?}
      - GITEA__mailer__PROTOCOL=smtp+starttls
    restart: always
    extra_hosts:
      - host:192.168.2.200
    volumes:
      - /opt/gitea:/data
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "3003:3000"
      - "222:22"
