--- services: install_site: build: install_site environment: - BASE_URL - EMAIL volumes: - ./nginx.conf:/web/gitea.conf - sites:/sites/ - certs:/etc/letsencrypt/ - certbotroot:/var/www/certbot/ - /var/run/docker.sock:/var/run/docker.sock db: image: docker.io/postgres:15 restart: unless-stopped environment: - POSTGRES_DB=$POSTGRES_DB - POSTGRES_USER=$POSTGRES_USER - POSTGRES_PASSWORD=$POSTGRES_PASSWORD volumes: - db:/var/lib/postgresql/data/ gitea: image: docker.io/gitea/gitea:latest-rootless restart: unless-stopped ports: - "$SSH_PORT:2222" environment: - POSTGRES_HOST=db - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=db:5432 - GITEA__database__NAME=$POSTGRES_DB - GITEA__database__USER=$POSTGRES_USER - GITEA__database__PASSWD=$POSTGRES_PASSWORD volumes: - data:/var/lib/gitea/ - config:/etc/gitea/ - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro networks: - nginx - default depends_on: - db volumes: sites: external: true certs: external: true certbotroot: external: true config: {} data: {} db: {} networks: nginx: external: true