# Drone 安装
Drone 是一个高效灵活的 CI/CD 工具。
官方网站https://www.drone.io/ (opens new window)
# 创建 docker-compose.yml
文件
version: '3'
services:
drone-server:
restart: always
image: drone/drone:1
ports:
- "10003:80"
volumes:
- ./data/drone/:/var/lib/drone/
- ./data/data/:/data/
environment:
- DRONE_GITEA_SERVER=https://gitea服务器地址
- DRONE_GITEA_CLIENT_ID=gitea生成的OAuth2客户端ID
- DRONE_GITEA_CLIENT_SECRET=gitea生成的OAuth2客户端密钥
- DRONE_SERVER_HOST=drone服务器地址
- DRONE_SERVER_PROTO=https
- DRONE_RPC_SECRET=自定义的Drone与runner通信密钥
drone-runner-docker:
restart: always
image: drone/drone-runner-docker:1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone-server
- DRONE_RPC_SECRET=自定义的Drone与runner通信密钥
# 生成随机密码命令
openssl rand -hex 16