title: agent can't connect to server "DRONE_HOST is not properly configured"
body: <p>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:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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:</p>
  
  <blockquote>
    <p>msg="DRONE_HOST is not properly configured"</p>
  </blockquote>
  
  <p>I tried every possible combination for the <code>DRONE_HOST</code>, let it be the ip, domain name with http:// and without. Nothing seems to be working.</p>
  
  <p>My second guess was that something is wrong with the <code>DRONE_SERVER</code>, but I tried a lot of combinations there as well and nothing seems to be working.</p>
  
  <p>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...</p>
  
  <p>I would be very happy about any suggestion that might point me in the right direction.</p>
  
  <p>Thank you.  </p>