Hi guys - I’ve recently started experimenting with Drone to add a CI functionality to a Gitea server I host. Everything is currently running on the same server, with all traffic going through Traefik.
I have no issue accessing the Drone main UI page. Same goes for gitea webhooks being seen correctly by Drone. However, when a build job starts, it gets stuck on the git repo loading:
Initialized empty Git repository in /drone/src/.git/ + git fetch origin +refs/heads/master: fatal: unable to access 'https://gitea.example.com/username/drone-python-test.git/': Failed to connect to gitea.example.com port 443: Operation timed out
Here is the Drone part of my docker-compose.yml:
drone: image: drone/drone:1.0.0-rc.6 container_name: drone volumes: - drone-data:/var/lib/drone/ - /var/run/docker.sock:/var/run/docker.sock restart: always depends_on: - gitea environment: - DRONE_SERVER_HOST=drone:80 - DRONE_SERVER_PROTO=http - DRONE_TLS_AUTOCERT=false - DRONE_GITEA_SERVER=http://gitea:3001/ - DRONE_GIT_ALWAYS_AUTH=false - DRONE_RUNNER_CAPACITY=2 - DRONE_LOGS_DEBUG=true - DRONE_LOGS_PRETTY=true - DRONE_LOGS_COLOR=true networks: - proxy - gitea labels: - "traefik.enable=true" - "traefik.docker.network=proxy" - "traefik.frontend.rule=Host:drone.example.com" - "traefik.port=80"
Here “proxy” is the network used by Traefik. Gitea and Drone are talking to each other on the internal “gitea” network.
My Traefik configuration is fairly straightforward:
[entryPoints]
[entryPoints.http]
address = “:80”
[entryPoints.http.redirect]
entryPoint = “https”
[entryPoints.https]
address = “:443”
[entryPoints.https.tls]
Note that I have seen in a post here that when using a reverse proxy, I should set the header forwarding correctly and tried to add the Docker bridge subnet to the trusted IPs list following this with no success.
I suspect that the container that the agent is launching is not handled correctly by Traefik but I can’t figure out how to make this work. Any help would be appreciated!
Thanks.