Added runners

This commit is contained in:
Jim Martens 2020-01-04 15:16:16 +01:00
parent 8d566035bc
commit e8d6b289db
2 changed files with 20 additions and 1 deletions

View File

@ -3,6 +3,13 @@
file:
state: directory
path: /etc/drone
- name: create shared secret
command:
cmd: openssl rand -hex 16
register: drone_rpc_secret
run_once: true
- set_fact:
drone_rpc_secret: "{{ drone_rpc_secret.stdout }}"
- name: copy docker compose file for drone
template:
src: etc/drone/docker-compose.yml.j2

View File

@ -14,10 +14,22 @@ services:
environment:
- DRONE_SERVER_HOST={{ ci_domain }}
- DRONE_SERVER_PROTO=https
- DRONE_RUNNER_CAPACITY=2
- DRONE_RPC_SECRET={{ drone_rpc_secret }}
- DRONE_USER_CREATE=username:{{ gitea_user }},admin:true
- DRONE_GITEA_SERVER={{ gitea_url }}
- DRONE_GITEA_CLIENT_ID={{ gitea_client_id }}
- DRONE_GITEA_CLIENT_SECRET={{ gitea_client_secret }}
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
drone-runner:
image: drone/drone-runner-docker:1
ports:
- "3000:3000"
restart: always
environment:
- DRONE_RPC_PROTO=https
- DRONE_RPC_HOST={{ ci_domain }}
- DRONE_RPC_SECRET={{ drone_rpc_secret }}
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=${HOSTNAME}