[SOLVED] Gogs+drone webhook does not trigger builds

I push the .drone.yml to gogs,but drone no build it


I want to know the reason.

We have a dedicated thread that discusses all possible root causes. See Nothing happens when I push code, no builds, or builds stuck in pending.

The gogs webhook seem Ok

I have set debug mode,and use
docker logs to see log
but I can’t find “push”


from the gogs ,it seems Ok

If you do not see anything in the logs, it means the request was not delivered to Drone. This typically indicates Gogs is unable to reach Drone.

I use docker-compose to create Drone and gogs separately,so Gogs is unable to reach Drone.
now I create them in same network,but I meet a new question.


default: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I have change the .drone.yml format to 1.
I think that it need sudo docker.Could you help me.

This error often indicates Drone was misconfigured. It would be helpful when posting issues to provide more detail, such as the configuration you are using.

version: ‘3’

services:
drone-server:
container_name: drone-server
image: drone/drone:latest
ports:
- “36000:80”
- 8443:443
- 9000
volumes:
- ./var/run/docker.sock:/var/run/docker.sock
- ./var/lib/drone:/data

environment:
  - DRONE_LOGS_DEBUG=true
  - DRONE_GIT_ALWAYS_AUTH=false
  - DRONE_SERVER_HOST=172.20.30.203
  - DRONE_GOGS_SERVER=http://172.20.30.203:10080
  - DRONE_SERVER_PROTO=http
  - DRONE_TLS_AUTOCERT=false
  - DRONE_RPC_SECRET=ALQU2M0KdptXUdTPKcEw
restart: always
networks:
  - drone_net

gogs:
container_name: gogs
image: gogs/gogs
ports:
- “10022:22”
- “10080:3000”
volumes:
- ./var/gogs:/data
restart: always
depends_on:
- gogs-mysql
links:
- gogs-mysql:db
networks:
- drone_net

gogs-mysql:
container_name: gogs-mysql
image: mysql:latest
ports:
- 3306:3306
volumes:
- ./opt/mysql/mysqlVolume:/var/lib/mysql
- ./var/run/docker.sock:/var/run/docker.sock
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: pass
MYSQL_DATABASE: gogs
MYSQL_USER: gogs
MYSQL_PASSWORD: pass
TZ: Asia/Shanghai

restart: always
networks:
   - drone_net

drone-agent:
container_name: drone-agent
image: drone/agent:latest
command: agent
depends_on:
- drone-server
volumes:
- ./var/run/docker.sock:/var/run/docker.sock

environment:
  - DRONE_RPC_SERVER=http://drone-server
  - DRONE_RPC_SECRET=ALQU2M0KdptXUdTPKcEw

restart: always
networks:
  - drone_net

networks:
drone_net:
driver: bridge

You are missing DRONE_AGENTS_ENABLED=true

This parameter is required when using agents, otherwise Drone runs in single-machine mode where the server executes builds directly. Setting DRONE_AGENTS_ENABLED=true will prevent the error.

However, if you are running everything on a single server, you really do not need agents. You should instead follow the single-machine installation instructions, which is the optimal configuration for a single server, and does not require agents. https://docs.drone.io/installation/gogs/single-machine/

I am going to close this thread as solved since we have solved the original issue(s). New threads can be opened for new topics.