name: gitea
type: generic
docroot: .
webserver_type: generic
nodejs_version: "24"
corepack_enable: true

webimage_extra_packages:
  - make
  - build-essential
  - libsqlite3-dev

database:
  type: postgres
  version: "17"

# Route HTTPS (gitea.ddev.site) to gitea's port 3000 inside the web container
web_extra_exposed_ports:
  - name: gitea
    container_port: 3000
    http_port: 80
    https_port: 443

web_extra_daemons:
  - name: gitea-web
    command: "/var/www/html/gitea web --config /var/www/html/.ddev/gitea/app.ini"
    directory: /var/www/html

web_environment:
  - GITEA_WORK_DIR=/var/www/html
  - GITEA_CUSTOM=/var/www/html/.ddev/gitea
