version: "3" networks: gitea: name: gitea-network external: false ipam: config: - subnet: cloudflare-tunnel: external: true services: gitea: image: gitea/gitea:latest container_name: gitea environment: - USER_UID= - USER_GID= - GITEA__database__DB_TYPE=mysql - GITEA__database__HOST=db:3306 - GITEA__database__NAME= - GITEA__database__USER= - GITEA__database__PASSWD= restart: unless-stopped networks: gitea: cloudflare-tunnel: ipv4_address: volumes: - /gitea/data:/data ports: - "3000:3000" - "222:22" depends_on: - db db: image: mysql:latest container_name: gitea-db restart: unless-stopped environment: - MYSQL_ROOT_PASSWORD= - MYSQL_USER= - MYSQL_PASSWORD= - MYSQL_DATABASE= networks: - gitea volumes: - /gitea/mysql:/var/lib/mysql