networks: gitea: external: false caddy_caddy: external: true volumes: git-nfs: driver_opts: type: "nfs" o: "addr=10.0.20.252,rw,noatime,nolock,soft,rsize=131072,wsize=131072,tcp,timeo=14" device: ":/mnt/pile/drive/git" services: gitea: image: gitea/gitea:1.21.10 container_name: gitea environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=DOCKER-SECRET->gitea.db.host - GITEA__database__NAME=DOCKER-SECRET->gitea.db.name - GITEA__database__USER=DOCKER-SECRET->gitea.db.user - GITEA__database__PASSWD=DOCKER-SECRET->gitea.db.passwd restart: always networks: - gitea - caddy_caddy volumes: - type: volume source: git-nfs target: /data volume: subpath: gitea - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro secrets: - gitea.db.user - gitea.db.passwd - gitea.db.name - gitea.db.host ports: - "3000:3000" - "222:22" secrets: gitea.db.user: external: true gitea.db.passwd: external: true gitea.db.name: external: true gitea.db.host: external: true