services: woodpecker-server: image: woodpeckerci/woodpecker-server:latest ports: - "8000:8000" - "9000:9000" environment: WOODPECKER_HOST: https://${WOODPECKER_HOST} WOODPECKER_PROTO: https WOODPECKER_OPEN: "false" WOODPECKER_GITEA: "true" WOODPECKER_GITEA_URL: https://${GITEA_HOST} WOODPECKER_GITEA_CLIENT: ${WOODPECKER_GITEA_CLIENT} WOODPECKER_GITEA_SECRET: ${WOODPECKER_GITEA_SECRET} WOODPECKER_AGENT_SECRET: ${WOODPECKER_AGENT_SECRET} WOODPECKER_ORGS: homelab,admin WOODPECKER_LOG_LEVEL: info WOODPECKER_DATABASE_DRIVER: postgres WOODPECKER_DATABASE_DATASOURCE: postgres://${DB_USER}:${DB_PASS}@${POSTGRES_HOST}:${POSTGRES_PORT}/woodpecker?sslmode=disable volumes: - /var/run/docker.sock:/var/run/docker.sock - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro networks: - traefik_backend - postgresql_db-backend deploy: replicas: 1 placement: constraints: - node.hostname == docker-2 labels: - traefik.enable=true - traefik.http.routers.woodpecker.entrypoints=websecure - "traefik.http.routers.woodpecker.rule=Host(`${WOODPECKER_HOST}`)" - traefik.http.routers.woodpecker.tls=true - traefik.http.routers.woodpecker.tls.certresolver=letsencrypt - traefik.docker.network=traefik_backend - traefik.http.services.woodpecker.loadbalancer.server.port=8000 update_config: parallelism: 1 delay: 15s failure_action: rollback monitor: 30s order: start-first rollback_config: parallelism: 1 failure_action: pause order: start-first woodpecker-agent: image: woodpeckerci/woodpecker-agent:latest command: agent environment: WOODPECKER_SERVER: woodpecker-server:9000 WOODPECKER_AGENT_SECRET: ${WOODPECKER_AGENT_SECRET} WOODPECKER_MAX_PROCS: 4 WOODPECKER_LOG_LEVEL: info WOODPECKER_FILTER_LABELS: "true" volumes: - /var/run/docker.sock:/var/run/docker.sock - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro networks: - traefik_backend deploy: mode: global update_config: parallelism: 1 delay: 30s failure_action: rollback monitor: 15s order: start-first rollback_config: parallelism: 1 failure_action: pause order: start-first networks: traefik_backend: external: true postgresql_db-backend: external: true