Reduce redundancy of drone setup
This commit is contained in:
parent
b2d6524b0b
commit
422f36f523
3 changed files with 36 additions and 21 deletions
|
@ -0,0 +1,23 @@
|
|||
services:
|
||||
ci:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ci.Dockerfile
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- server.common.env
|
||||
docker:
|
||||
image: drone/drone-runner-docker
|
||||
restart: unless-stopped
|
||||
env_file: runner.common.env
|
||||
environment:
|
||||
DRONE_RUNNER_NAME: docker-runner
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
ssh:
|
||||
image: drone/drone-runner-ssh
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- runner.common.env
|
||||
environment:
|
||||
DRONE_RUNNER_NAME: ssh-runner
|
|
@ -1,27 +1,19 @@
|
|||
services:
|
||||
ci-template:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ci.Dockerfile
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- server.common.env
|
||||
extends:
|
||||
file: docker-compose.core.yml
|
||||
service: ci
|
||||
env_file: []
|
||||
environment: {}
|
||||
docker-template:
|
||||
image: drone/drone-runner-docker
|
||||
restart: unless-stopped
|
||||
extends:
|
||||
file: docker-compose.core.yml
|
||||
service: docker
|
||||
depends_on: []
|
||||
env_file:
|
||||
- runner.common.env
|
||||
environment:
|
||||
DRONE_RUNNER_NAME: docker-runner
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
env_file: []
|
||||
ssh-template:
|
||||
image: drone/drone-runner-ssh
|
||||
restart: unless-stopped
|
||||
extends:
|
||||
file: docker-compose.core.yml
|
||||
service: ssh
|
||||
depends_on: []
|
||||
env_file:
|
||||
- runner.common.env
|
||||
environment:
|
||||
DRONE_RUNNER_NAME: ssh-runner
|
||||
env_file: []
|
||||
|
|
|
@ -19,7 +19,7 @@ begin
|
|||
echo "{}" | sudo tee "$config" >/dev/null
|
||||
echo "{}" | sudo tee "$secrets" >/dev/null
|
||||
|
||||
cp "$dir"/{ci.Dockerfile,.dockerignore} "$root"
|
||||
cp "$dir"/{ci.Dockerfile,docker-compose.core.yml,.dockerignore} "$root"
|
||||
echo "DRONE_JSONNET_ENABLED=true" | sudo tee "$root/server.common.env" >/dev/null
|
||||
echo "DRONE_RUNNER_CAPACITY=2" | sudo tee "$root/runner.common.env" >/dev/null
|
||||
|
||||
|
|
Loading…
Reference in a new issue