Can't kickstart it in single-machine mode

Hi there!

My configuration is like this:

  drone:
    image: drone/drone:latest
    container_name: drone
    expose:
      - 80
    environment:
      - DRONE_GITEA_SERVER=my_address
      - DRONE_GITEA_CLIENT_ID=client_id
      - DRONE_GITEA_CLIENT_SECRET=client_secret
      - DRONE_RPC_SECRET=rpc_secret
      - DRONE_GIT_ALWAYS_AUTH=false
      - DRONE_SERVER_PROTO=https
      - DRONE_SERVER_HOST=my_address
      - DRONE_TLS_AUTOCERT=false
      - DRONE_RUNNER_CAPACITY=3
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./drone:/data
    restart: always
    networks:
      - default
      - web
    labels:
      - traefik.enable=true
      - traefik.docker.network=default
      - traefik.http.routers.drone_http.rule=Host(`my_address`)
      - traefik.http.routers.drone_http.entrypoints=http
      - traefik.http.routers.drone_http.middlewares=https_redirect
      - traefik.http.routers.drone.rule=Host(`my_address)
      - traefik.http.routers.drone.entrypoints=https
      - traefik.http.routers.drone.tls.certresolver=letsencrypt
      - com.centurylinklabs.watchtower.enable=true

I want to run it on the same machine with my gitea installation without drone agents. (Single-machine installation?). It never get started though. Jobs are in “Pending” state which means the server waits for agents to connect.
Okay. I’ve added an agent like this:

  drone-agent:
    image: drone/agent:latest
    container_name: drone-agent
    environment:
      - DRONE_LOGS_DEBUG=true
      - DRONE_RPC_SECRET=the_same_rpc_secret
      - DRONE_RPC_PROTO=https
      - DRONE_RPC_HOST=my_address
      - DRONE_RUNNER_NAME="local"
      - DRONE_RUNNER_CAPACITY=4
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
    networks:
      - default
      - web

I’ve also removed DRONE_RUNNER_CAPACITY=3 the server sees the agent, but agent is not able to communicate properly and I get error saying something about “<” symbol. Isn’t single machine mode is not supported any more and I’m not able to use Drone on my private server?

Isn’t single machine mode is not supported any more and I’m not able to use Drone on my private server?

Single machine mode was removed from the documentation and will eventually be deprecated. There are no immediate plans to deprecate until Drone 2. So it is still safe to use for now. In terms of getting this to work, see http://discuss.harness.io/t/1-5-0-release-notes/5797

I get error saying something about “<” symbol

this tells me that the agent is making an http request to your server and is expecting a json response, but is instead receiving an html page or an http redirect (the html document and http redirect both begin with a <). In both instances this usually indicates some sort of networking configuration issue.

1 Like

Thanks @ashwilliams1! The issue was with http redirect of gitea but I was thinking it’s drone server misbehaving.