services: server: image: gitea/gitea:latest-rootless container_name: gitea depends_on: - db environment: - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=gitea-db-1:5432 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=${DBPASS} - VIRTUAL_HOST=git.${DOMAIN},git.${DOMAIN} - VIRTUAL_PORT=3004 - LETSENCRYPT_HOST=git.${DOMAIN},git.${DOMAIN} - LETSENCRYPT_EMAIL=${EMAIL} restart: always volumes: - ./data:/var/lib/gitea - ./config:/etc/gitea - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3004:3004" - "2222:2222" expose: - "3004" db: image: postgres:14 restart: always environment: - POSTGRES_USER=gitea - POSTGRES_PASSWORD=${DBPASS} - POSTGRES_DB=gitea volumes: - ./db:/var/lib/postgresql/data networks: default: name: nginx-proxy external: true