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

53 lines
1.9 KiB
YAML
Raw Normal View History

# vim: ft=yaml.ansible
2019-03-02 21:34:33 +00:00
---
2020-03-01 12:47:09 +00:00
- name: set up drone with docker runner
docker_compose:
project_name: drone
pull: yes
definition:
version: "3.6"
services:
drone:
container_name: "drone"
image: "drone/drone:{{ services.drone.version }}"
2020-03-01 12:47:09 +00:00
restart: unless-stopped
networks:
- external_services
- drone
volumes:
- "{{ services.drone.volume_folder }}:/data"
2020-03-01 12:47:09 +00:00
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
2023-07-26 16:06:40 +00:00
DRONE_GITEA_SERVER: "https://{{ services.forgejo.domain }}"
2020-03-01 12:47:09 +00:00
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 }}"
2020-03-01 12:47:09 +00:00
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 }}"
2020-03-01 12:47:09 +00:00
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
drone-runner-docker:
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:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
DRONE_RPC_HOST: "{{ services.drone.domain }}"
2020-03-01 12:47:09 +00:00
DRONE_RPC_PROTO: "https"
DRONE_RPC_SECRET: "{{ drone_secrets.rpc_shared_secret }}"
DRONE_RUNNER_CAPACITY: 2
DRONE_RUNNER_NAME: "data.coop_drone_runner"
networks:
drone:
external_services:
external:
name: external_services