I'm trying to setup an standalone docker installation with drone, traefik and other services, with the following configuration:
version: '2'
volumes:
drone-data:
gogs-db-data:
gogs-data:
gogs-conf:
services:
#Database for Gogs - PostGres
gogsdb:
image: postgres:9.6
restart: always
labels:
- com.ansible.role=postgres
env_file:
- .env/gogsdb.env
volumes:
- gogs-db-data:/var/lib/postgresql/data
# Go Git Service. Version Control
gogs:
image: gcavalcante8808/docker-gogs
restart: always
labels:
- com.ansible.role=drone-server
- "traefik.frontend.rule=Host:gogs.cluster.local;PathPrefix:/"
- "traefik.port=3000"
- "traefik.docker.network=management-default"
- "traefik.enabled=true"
env_file:
- .env/gogs.env
volumes:
- gogs-data:/home/git/gogs-repositories
- gogs-conf:/home/git/gogs/custom
ports:
- "2222:2222"
depends_on:
- gogsdb
# Drone Server - CI/CD Support.
drone-server:
image: drone/drone:latest
ports:
- 8000:8000
env_file:
- .env/drone-server.env
volumes:
- drone-data:/var/lib/drone/
labels:
- com.ansible.role=drone-server
- "traefik.frontend.rule=Host:drone.cluster.local;PathPrefix:/"
- "traefik.port=9000"
- "traefik.docker.network=management-default"
- "traefik.enabled=true"
extra_hosts:
- "drone.cluster.local:127.0.0.1"
restart: always
# Drone Agent - Latest
drone-agent:
image: drone/agent:latest
command: agent
restart: always
env_file:
- .env/drone-server.env
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# Traefik - Reverse Proxy
traefik:
image: traefik:1.5
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 80:80
- 443:443
- 8080:8080
command: --logLevel=DEBUG \
--docker \
--docker.domain=cluster.local
--docker.watch
--web
In my case, my drone-server is configured to use the address http://drone.cluster.local and I can access it through the port 8000 (http://drone.cluster.local:8080) which is mapped on docker-compose.yml file.
But if I Try to access the address http://drone.cluster.local (which passes through Traefik) I just receive an "Internal Server Error" and the drone show the following messages in its log:
INFO: 2018/01/09 02:58:31 transport: http2Server.HandleStreams received bogus greeting from client: "GET / HTTP/1.1\r\nHost: dr"
Some other info
The Drone ENV file have the following definitions:
DRONE_OPEN=true
DRONE_HOST=http://drone.cluster.local
DRONE_GOGS=true
DRONE_GOGS_URL=http://gogs:3000/
DRONE_SECRET=test-secret
DRONE_SERVER=drone-server:9000
DRONE_ADMIN=gogs-admin
I can reach the "cluster.local" address using my hosts file as following:
127.0.0.1 semaphore.cluster.local drone.cluster.local gogs.cluster.local
For now, I don't have any TLS configurations.
Question
With all the information provided in mind, how can I solve this Traefik->Drone issue? Or at least, circunvect the "received bogus greeting from client" problem.
Thanks in advance.