services: forgejo: image: codeberg.org/forgejo/forgejo:9-rootless container_name: forgejo restart: unless-stopped ports: - "${HOST_IP}:3000:3000" - "${HOST_IP}:2222:2222" environment: - USER_UID=1000 - USER_GID=1000 - FORGEJO__database__DB_TYPE=postgres - FORGEJO__database__HOST=postgres:5432 - FORGEJO__database__NAME=${FORGEJO_DB_NAME} - FORGEJO__database__USER=${FORGEJO_DB_USER} - FORGEJO__database__PASSWD=${FORGEJO_DB_PASS} - FORGEJO__server__ROOT_URL=https://git.3ddbrewery.com/ - FORGEJO__server__SSH_DOMAIN=git.3ddbrewery.com - FORGEJO__server__SSH_PORT=2222 - FORGEJO__server__SSH_LISTEN_PORT=2222 volumes: - /mnt/nas/docker/forgejo:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro networks: - database - proxy deploy: resources: limits: cpus: '1' memory: 512M healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"] interval: 30s timeout: 10s retries: 5 labels: - "autoheal=true" - "com.centurylinklabs.watchtower.enable=true" - "homepage.group=Development" - "homepage.name=Forgejo" - "homepage.href=https://git.3ddbrewery.com" - "homepage.icon=forgejo.png" - "homepage.description=Git Server" networks: database: external: true proxy: external: true