1

I tried setting up drone 0.8.1 but the agent can't connect to the server even though from my point of view everything looks good. The following is my compose file:

version: '2'

services:
  drone-server:
    image: drone/drone:0.8.1
    ports:
      - 80:8000
      - 9000:9000
    volumes:
      - /var/lib/drone:/var/lib/drone
    restart: always
    environment:
      - DRONE_SECRET= secret
      - DRONE_HOST=http://ip/domain/whatever
      - DRONE_OPEN=false
      - DRONE_ADMIN=user
      - DRONE_GOGS=true
      - DRONE_GOGS_URL=https://git.domain.io
      - DRONE_GOGS_PRIVATE_MODE=true

  drone-agent:
    image: drone/drone:0.8.1
    command: agent
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
    environment:
      - DRONE_SECRET=secret
      - DRONE_SERVER=drone-server:9000

My first try was with nginx in front of drone, but I read that with 0.8 the agent is no longer connecting via ws, so it might cause problems, this is why I disabled nginx to debug but it's still the same result. The agent isn't able to run and throws a fatal error:

msg="DRONE_HOST is not properly configured"

I tried every possible combination for the DRONE_HOST, let it be the ip, domain name with http:// and without. Nothing seems to be working.

My second guess was that something is wrong with the DRONE_SERVER, but I tried a lot of combinations there as well and nothing seems to be working.

The server is running fine, I can log in to the panel and I can see that it fetches the commits, but somehow the agent has its problems and I am not really sure what to do...

I would be very happy about any suggestion that might point me in the right direction.

Thank you.

Niklas Karoly
  • 25
  • 1
  • 5

1 Answers1

3

It looks like you are using the wrong image for the agent. The agent image is drone/agent and the server image is drone/drone. The agent and server images were separated as of drone version 0.8 [1]

[1] http://docs.drone.io/release-0.8.0#upgrade-instructions

Brad Rydzewski
  • 2,523
  • 14
  • 18