# https://hub.docker.com/r/bitnami/gitea

version: '2'
services:
  postgresql:
    image: docker.io/bitnami/postgresql:15
    volumes:
      - '/data/gitea/postgresql_data/:/bitnami/postgresql'
    environment:
      - POSTGRESQL_DATABASE=gitea_db
      - POSTGRESQL_USERNAME=bn_gitea
      - POSTGRESQL_PASSWORD=SuperWdd.123
      # ALLOW_EMPTY_PASSWORD is recommended only for development.
  gitea:
    image: docker.io/bitnami/gitea:1.19.3-debian-11-r0
    volumes:
      - '/data/gitea/gitea_data:/bitnami/gitea'
    environment:
      - GITEA_DATABASE_HOST=postgresql
      - GITEA_DATABASE_NAME=gitea_db
      - GITEA_DATABASE_USERNAME=bn_gitea
      - GITEA_DATABASE_PASSWORD=SuperWdd.123
      - GITEA_ADMIN_USER=wdd
      - GITEA_ADMIN_PASSWORD=SuperWdd.123
      - GITEA_ADMIN_EMAIL=wdd@cmii.com
      - GITEA_HTTP_PORT=3000
      - GITEA_SSH_LISTEN_PORT=22222
      - GITEA_APP_NAME=Gitea-闲下来就喝杯茶吧
      - GITEA_DOMAIN=192.168.35.70
      - GITEA_PROTOCOL=http
      - GITEA_RUN_MODE=prod
    ports:
      - '3000:3000'
      - '22222:22222'
