Hello,
As title says, i was wondering how to add docker-compose health check to the drone/drone image, it looks like that the base image is very small, i tried to mount my own path like /usr/local/bin with go app that can do health check but i am getting file not found.
"oci runtime error: exec failed: container_linux.go:265: starting container process caused “no such file or directory”
Any ideas?
version: "2.1"
services:
server:
image: drone/drone:0.8.2
ports:
- 8585:8000
- 9000
volumes:
- ./data:/var/lib/drone/
- /usr/local/bin:/usr/local/bin
restart: unless-stopped
environment:
- DRONE_OPEN=false
- DRONE_ADMIN=UnAfraid
- DRONE_GITHUB=true
- DRONE_GITHUB_CLIENT=<github client>
- DRONE_GITHUB_SECRET=<github secret>
- DRONE_GITHUB_MERGE_REF=false
- DRONE_SECRET=<my secret>
- DRONE_HOST=https://drone.mydomain.com
healthcheck:
test: ["CMD", "/usr/local/bin/go-health-check", "tcp", "server", "8000"]
interval: 10s
timeout: 30s
retries: 5
agent:
image: drone/agent:0.8.2
command: agent
restart: always
depends_on: [ server ]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SERVER=server:9000
- DRONE_SECRET=<my secret>
root@ubuntu:~/docker/drone# ls -lha /usr/local/bin/go-health-check
-rwxr-xr-x 1 root root 2.0M Dec 3 14:01 /usr/local/bin/go-health-check
root@ubuntu:~/docker/drone#