Agent in status Pending all time

On my test bench, Drone cannot reach the Agent, Build is constantly in Pending status.

docker-compose.yaml:

version: "3"
networks:
    drone:
services:
  drone:
    image: drone/drone:1.0.0-rc.5
    container_name: drone
    ports:
        - 80:80
        - 443:443
    volumes:
        - /var/lib/drone:/data
    environment:
        - DRONE_GIT_ALWAYS_AUTH=false
        - DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER}
        - DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
        - DRONE_SERVER_HOST=${DRONE_SERVER_HOST}
        - DRONE_SERVER_PROTO=${DRONE_SERVER_PROTO}
        - DRONE_TLS_AUTOCERT=false
        - DRONE_LOGS_DEBUG=true
    networks:
        - drone
        
  agent:
    image: drone/agent:1.0.0-rc.5
    container_name: agent
    volumes:
        - /var/run/docker.sock:/var/run/docker.sock
    environment:
        - DRONE_RPC_SERVER=${DRONE_RPC_SERVER}
        - DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
        - DRONE_RUNNER_CAPACITY=2
        - DRONE_RUNNER_NAME=agent
        - DRONE_LOGS_DEBUG=true
    networks:
        - drone

.drone.yml

kind: pipeline
name: default

platform:
    os: linux
    arch: amd64

steps:
    - name: run-hello-world
      image: alpine
      commands:
          - echo Test

node:
    instance: agent

the problem is with the yaml syntax. The node block in your yaml instructs drone to only execute the pipeline on agents with DRONE_RUNNER_LABELS=instance=agent, however, this variable is never being set which means the build will always be pending. Just remove this block and it should work.

-node:
-    instance: agent

Also, if you are using docker-compose and running Drone on a single machine, you should just use the single-machine install instructions. You do not need agents when running drone on a single machine. See https://docs.drone.io/installation/gitea/

This is a test bench, then the agent will be launched on the build server. How do I specify in the Pipeline agent on which I need to run build? I took an example from the documentation

https://docs.drone.io/reference/agent/drone-runner-labels/

Agent service changes:

    - DRONE_RUNNER_LABELS=instance:agent

Did not help.