Cannot ping the remote server in mac

i follow the guide install github provider,here is docker-compose.yaml:

drone:
container_name: drone
image: drone/drone:1
restart: always
volumes:
  - ~/drone:/data
ports:
  - 80:80
  - 443:443
environment:
  - DRONE_AGENTS_ENABLED=true
  - DRONE_GITHUB_SERVER=https://github.com
  - DRONE_GITHUB_CLIENT_ID=${DRONE_GITHUB_CLIENT_ID}
  - DRONE_GITHUB_CLIENT_SECRET=${DRONE_GITHUB_CLIENT_SECRET}
  - DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
  - DRONE_SERVER_HOST=${DRONE_SERVER_HOST}
  - DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO}


drone-runner:
container_name: drone-runner
image: drone/drone-runner-docker:1
restart: always
volumes:
  - /var/run/docker.sock:/var/run/docker.sock
ports:
  - 3000:3000
environment:
  - DRONE_RPC_PROTO=http
  - DRONE_RPC_HOST=${DRONE_SERVER_HOST}
  - DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
  - DRONE_RUNNER_CAPACITY=2
  - DRONE_RUNNER_NAME=${DRONE_SERVER_HOST} 

env:

export DRONE_GITHUB_CLIENT_ID=xxx
export DRONE_GITHUB_CLIENT_SECRET=xxx
export DRONE_RPC_SECRET=d75020850d1ba75c0d21c713106ceeac
export DRONE_SERVER_HOST=dev.drone.com
export DRONE_SERVER_PROTO=http

but i get error in docker logs drone-runner command

time=“2019-11-18T02:44:48Z” level=error msg=“cannot ping the remote server” error=“Post http://dev.drone.com/rpc/v2/ping: dial tcp 127.0.0.1:80: connect: connection refused”

what am i wrong

looks like a networking configuration error because 127.0.0.1 points to the network inside the runner container. The server is on a separate network and will not be available at the 127.0.0.1 address. You can typically access containers using the container name as the hostname. You can read more about this at https://docs.docker.com/compose/networking/