feat: add sample worker
continuous-integration/drone Build is passing Details

This commit is contained in:
Jixun Wu 2022-11-26 17:36:30 +00:00
parent 7eb93aaa70
commit bf6bf9f3b8
2 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
artifact.txt
.env

17
docker-compose.yml Normal file
View File

@ -0,0 +1,17 @@
version: '2'
services:
drone-worker:
image: drone/drone-runner-docker:1
restart: "always"
environment:
- "DRONE_RPC_PROTO=https"
- "DRONE_RPC_HOST=ci.unlock-music.dev"
- "DRONE_RUNNER_CAPACITY=2"
- "DRONE_RESOURCE_LIMIT_CPU=0.3"
# 从 .env 文件读取
- "DRONE_RUNNER_NAME=${DRONE_RUNNER_NAME}"
- "DRONE_RPC_SECRET=${DRONE_RPC_SECRET}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 0.0.0.0:8080:8080