DRONE_HOST must be <scheme>://<hostname> format

Hi,
I’m currently trying to setup Drone for over 2h now and I just can’t find anything useful to this Issue.

My docker-compose.yaml:

version: '2'

services:
  drone-server:
    image: drone/drone:0.8

    ports:
      - 80:8000
      - 9000
    volumes:
      - /srv/drone:/var/lib/drone/
    restart: always
    environment:
      - DRONE_OPEN=true
      - DRONE_HOST=http://ci.prefix.moe
      - DRONE_GITHUB=true
      - DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
      - DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
      - DRONE_SECRET=${DRONE_SECRET}

  drone-agent:
    image: drone/agent:0.8

    command: agent
    restart: always
    depends_on:
      - drone-server
    volumes:
      - /srv/docker.sock:/var/run/docker.sock
    environment:
      - DRONE_SERVER=drone-server:9000
      - DRONE_SECRET=${DRONE_SECRET}

And I constantly get the following error message:
time="2018-08-27T20:43:38Z" level=fatal msg="DRONE_HOST must be <scheme>://<hostname> format"
which I just can’t explain why it doesn’t accept the currently set one.

I hope someone can help out with it, since it’s really going on my nerves after such a long time now.
Thanks in advance

this is the logic that triggers the error:

if you run docker inspect drone-server what is the DRONE_HOST value? Please paste the json response of the command into this thread.

Okay, don’t know what I did or what happened, but now the container starts without issues. I haven’t changed anything aside from the ports since it couldn’t bind to port 80 since I’ll proxy it with a nginx.

However, here’s the inspect as requested (Removed the secrets)

[
    {
        "Id": "24c6fffa78a91f1465757b936f78bf5f100a1d81c9066f428a18d204156e48a7",
        "Created": "2018-08-28T06:54:20.7331486Z",
        "Path": "/bin/drone-server",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 18861,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2018-08-28T06:54:21.957678666Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:cd7706b4a11442aa409e679c8060ae2251f187aaaa0c5f4119f0fd0d8b88dbf8",
        "ResolvConfPath": "/var/lib/docker/containers/24c6fffa78a91f1465757b936f78bf5f100a1d81c9066f428a18d204156e48a7/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/24c6fffa78a91f1465757b936f78bf5f100a1d81c9066f428a18d204156e48a7/hostname",
        "HostsPath": "/var/lib/docker/containers/24c6fffa78a91f1465757b936f78bf5f100a1d81c9066f428a18d204156e48a7/hosts",
        "LogPath": "/var/lib/docker/containers/24c6fffa78a91f1465757b936f78bf5f100a1d81c9066f428a18d204156e48a7/24c6fffa78a91f1465757b936f78bf5f100a1d81c9066f428a18d204156e48a7-json.log",
        "Name": "/drone_drone-server_1",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "docker-default",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/srv/drone:/var/lib/drone:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "drone_default",
            "PortBindings": {
                "8000/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": ""
                    }
                ],
                "9000/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": ""
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": [],
            "CapAdd": null,
            "CapDrop": null,
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/asound",
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/edee597b380adc4fbb65f1d9300b22849ca2689b067cab66c8b9d1466728ef1f-init/diff:/var/lib/docker/overlay2/35a0df62c98934771a114a2116af7d73efdb6c3329677c00d6bbd42e7dfab9d3/diff:/var/lib/docker/overlay2/f1cb8c615f63bb4d48a99e8824aad5bc24fe6e98154cc5981efba8c2b7789242/diff",
                "MergedDir": "/var/lib/docker/overlay2/edee597b380adc4fbb65f1d9300b22849ca2689b067cab66c8b9d1466728ef1f/merged",
                "UpperDir": "/var/lib/docker/overlay2/edee597b380adc4fbb65f1d9300b22849ca2689b067cab66c8b9d1466728ef1f/diff",
                "WorkDir": "/var/lib/docker/overlay2/edee597b380adc4fbb65f1d9300b22849ca2689b067cab66c8b9d1466728ef1f/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/srv/drone",
                "Destination": "/var/lib/drone",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "24c6fffa78a9",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "443/tcp": {},
                "80/tcp": {},
                "8000/tcp": {},
                "9000/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "DRONE_OPEN=true",
                "DRONE_HOST=http://ci.prefix.moe",
                "DRONE_GITHUB=true",
                "DRONE_GITHUB_CLIENT=eab9d9679cc88ecfcc69",
                "DRONE_GITHUB_SECRET=ddfdd6eac476f515061c55c41943f52e35abeb4b",
                "DRONE_SECRET=N53wn6j1rTYBtLIeQjIogilQnAvZtJUbBgEXUjSTHfKnhH8be61TUHZDXn6g00Mc",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "DATABASE_DRIVER=sqlite3",
                "DATABASE_CONFIG=/var/lib/drone/drone.sqlite",
                "GODEBUG=netdns=go",
                "XDG_CACHE_HOME=/var/lib/drone"
            ],
            "Cmd": null,
            "ArgsEscaped": true,
            "Image": "drone/drone:0.8",
            "Volumes": {
                "/var/lib/drone": {}
            },
            "WorkingDir": "/",
            "Entrypoint": [
                "/bin/drone-server"
            ],
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "5fd6057abf3af79d28f66c84a06e7248f595bcb56d66138aba25606a7dc147bb",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "drone",
                "com.docker.compose.service": "drone-server",
                "com.docker.compose.version": "1.22.0",
                "org.label-schema.build-date": "2018-07-27T14:31:49Z",
                "org.label-schema.vcs-ref": "c48150767c2700d35dcc29b110a81c8b5969175e",
                "org.label-schema.vcs-url": "https://github.com/drone/drone.git"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "1163b150a38c91d31c644772f38d1622807f5adbf22b467d341e8aad3724d69a",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "443/tcp": null,
                "80/tcp": null,
                "8000/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "32982"
                    }
                ],
                "9000/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "32981"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/1163b150a38c",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "drone_default": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "drone-server",
                        "24c6fffa78a9"
                    ],
                    "NetworkID": "e81ea2af7263b4f34b57aa3861c06207b53ec2fe400d6789da81d44d23e128db",
                    "EndpointID": "3a7e32faf1e3f22adf3e5272e89a8f77026122a4fec5005e4ff907bb285b598c",
                    "Gateway": "172.20.0.1",
                    "IPAddress": "172.20.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:14:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]