---

version: "3.8"

services:
  gitea:
    environment:
      - GITEA__database__DB_TYPE=postgres
      - GITEA__database__HOST=${POSTGRES_CONTAINER_NAME:-postgres}:5432
      - GITEA__database__NAME=${POSTGRES_DB}
      - GITEA__database__USER=${POSTGRES_USER}
      - GITEA__database__PASSWD=${POSTGRES_PASSWORD}
    depends_on:
      - postgres