Hi everyone,
I’m building a CI system using Traefik and Drone. At first glance, everything seemed fine because both the Traefik and Drone dashboards were working (with https). However, I discovered that the Drone webhook isn’t functioning, and I can’t find any relevant information in the Traefik access logs or error logs.
When I tried running curl -X POST myhttpsDroneroute
I received the error: Recv failure: Connection reset by peer
. Interestingly, I get the same result when I try to curl any other route with protocol https.
I’m out of ideas at this point. Could someone with more expertise help me figure this out?
The static config: traefik.yml
:
api:
dashboard: true
insecure: true
log:
filePath: '/log/traefik.log'
level: INFO
accessLog:
filePath: '/log/access.log'
entryPoints:
web:
address: ':80'
websecure:
address: ':443'
http:
tls:
certResolver: letsencrypt
providers:
file:
directory: /data/traefik/config
watch: true
docker:
endpoint: 'unix:///var/run/docker.sock'
exposedByDefault: false
certificatesResolvers:
letsencrypt:
acme:
email: myemail
storage: /letsencrypt/acme.json
dnsChallenge:
provider: alidns
docker-compose.yml
:
services:
traefik:
image: traefik:3.3.1
container_name: traefik
ports:
- '80:80'
- '443:443'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./letsencrypt:/letsencrypt
- ./config/static:/etc/traefik
- ./config/dynamic:/data/traefik/config
- ./log/:/log/
- /etc/timezone:/etc/timezone
- /etc/localtime:/etc/localtime
environment:
- ALICLOUD_ACCESS_KEY=myAliCloudAccessKey
- ALICLOUD_SECRET_KEY=myAliCloudSecretKey
networks:
- traefiknet
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.traefik.rule=Host(`mydomian`) && (PathPrefix(`/traefik`) || PathPrefix(`/api`))'
- 'traefik.http.routers.traefik.service=api@internal'
- 'traefik.http.routers.traefik.middlewares=traefik-strip,traefik-auth'
- 'traefik.http.middlewares.traefik-strip.stripprefix.prefixes=/traefik'
- 'traefik.http.middlewares.traefik-auth.basicauth.users=user:xxxx'
networks:
traefiknet:
name: devnet
external: true
And the dynamic config for Drone CI Which running docker container within same network as traefik:
http:
routers:
drone:
rule: 'Host(`myhttpsDroneroute`)'
service: drone
tls: {}
services:
drone:
loadBalancer:
servers:
- url: 'innerUrl:80' # protocol: http, path: drone-server, port: 80