Robert Kaussow
347a10ebb1
All checks were successful
continuous-integration/drone/push Build is passing
39 lines
1.2 KiB
Django/Jinja
39 lines
1.2 KiB
Django/Jinja
#jinja2:lstrip_blocks: True
|
|
{{ ansible_managed | comment }}
|
|
version: "3"
|
|
|
|
services:
|
|
droneci_runner_docker:
|
|
container_name: {{ droneci_runner_docker_container_name }}
|
|
image: {{ droneci_runner_docker_image }}
|
|
volumes:
|
|
- {{ droneci_runner_docker_socket_path }}:/var/run/docker.sock
|
|
{% if droneci_runner_docker_networks_applied | default([]) %}
|
|
networks:
|
|
{% for network in droneci_runner_docker_networks_applied %}
|
|
- {{ network }}
|
|
{% endfor %}
|
|
{% endif %}
|
|
privileged: true
|
|
environment:
|
|
- DRONE_RPC_PROTO=http
|
|
- DRONE_RPC_HOST={{ droneci_runner_docker_server }}
|
|
- DRONE_RPC_SECRET={{ droneci_runner_docker_secret }}
|
|
- DRONE_RUNNER_CAPACITY={{ droneci_runner_docker_capacity }}
|
|
{% if droneci_runner_docker_resources is defined %}
|
|
resources:
|
|
{{ droneci_runner_docker_resources | to_nice_yaml | indent(6) }}
|
|
{% endif %}
|
|
|
|
{% if droneci_runner_docker_networks | default([]) %}
|
|
networks:
|
|
{% for network in droneci_runner_docker_networks %}
|
|
{{ network.name }}:
|
|
{% if network.external | default(False) | bool %}
|
|
external: true
|
|
{% else %}
|
|
driver: {{ network.backend | default("bridge") }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|