ansible/roles/docker/tasks/services/drone.yml

52 lines
1.8 KiB
YAML
Raw Normal View History

2019-03-02 21:34:33 +00:00
---
2020-03-01 12:47:09 +00:00
- name: set up drone with docker runner
2022-11-26 08:52:41 +00:00
community.docker.docker_compose:
2020-03-01 12:47:09 +00:00
project_name: drone
2022-11-26 08:52:41 +00:00
pull: true
2020-03-01 12:47:09 +00:00
definition:
2022-11-26 08:52:41 +00:00
version: '3.6'
2020-03-01 12:47:09 +00:00
services:
drone:
2022-11-26 08:52:41 +00:00
container_name: drone
2020-03-01 12:47:09 +00:00
image: drone/drone:1
restart: unless-stopped
networks:
- external_services
- drone
volumes:
2022-11-26 08:52:41 +00:00
- '{{ services.drone.volume_folder }}:/data'
- /var/run/docker.sock:/var/run/docker.sock
2020-03-01 12:47:09 +00:00
environment:
2022-11-26 08:52:41 +00:00
DRONE_GITEA_SERVER: https://{{ services.gitea.domain }}
DRONE_GITEA_CLIENT_ID: '{{ drone_secrets.oauth_client_id }}'
DRONE_GITEA_CLIENT_SECRET: '{{ drone_secrets.oauth_client_secret }}'
DRONE_GIT_ALWAYS_AUTH: 'true'
DRONE_SERVER_HOST: '{{ services.drone.domain }}'
DRONE_SERVER_PROTO: https
DRONE_RPC_SECRET: '{{ drone_secrets.rpc_shared_secret }}'
PLUGIN_CUSTOM_DNS: 91.239.100.100
VIRTUAL_HOST: '{{ services.drone.domain }}'
LETSENCRYPT_HOST: '{{ services.drone.domain }}'
LETSENCRYPT_EMAIL: '{{ letsencrypt_email }}'
2020-03-01 12:47:09 +00:00
drone-runner-docker:
2022-11-26 08:52:41 +00:00
container_name: drone-runner-docker
image: drone/drone-runner-docker:{{ services.drone.version }}
2020-03-01 12:47:09 +00:00
restart: unless-stopped
networks:
- drone
volumes:
2022-11-26 08:52:41 +00:00
- /var/run/docker.sock:/var/run/docker.sock
2020-03-01 12:47:09 +00:00
environment:
2022-11-26 08:52:41 +00:00
DRONE_RPC_HOST: '{{ services.drone.domain }}'
DRONE_RPC_PROTO: https
DRONE_RPC_SECRET: '{{ drone_secrets.rpc_shared_secret }}'
2020-03-01 12:47:09 +00:00
DRONE_RUNNER_CAPACITY: 2
2022-11-26 08:52:41 +00:00
DRONE_RUNNER_NAME: data.coop_drone_runner
2020-03-01 12:47:09 +00:00
networks:
drone:
external_services:
external:
2022-11-26 08:52:41 +00:00
name: external_services