52 lines
1.4 KiB
Django/Jinja
52 lines
1.4 KiB
Django/Jinja
---
|
|
version: '3.9'
|
|
|
|
services:
|
|
runner:
|
|
image: gitea/act_runner:{{ deploy_gitea_runner_version }}
|
|
configs:
|
|
- source: config_yaml
|
|
target: /config.yaml
|
|
environment:
|
|
CONFIG_FILE: /config.yaml
|
|
GITEA_INSTANCE_URL: "{{ deploy_gitea_runner_server_url }}"
|
|
GITEA_RUNNER_REGISTRATION_TOKEN: "{{ deploy_gitea_runner_server_token }}"
|
|
GITEA_RUNNER_NAME: "{{ deploy_gitea_runner_name }}"
|
|
volumes:
|
|
- data:/data
|
|
{% if deploy_gitea_runner_config['cache']['enabled'] is defined and deploy_gitea_runner_config['cache']['enabled'] %}
|
|
- cache:/cache
|
|
{%- endif %}
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
{% if deploy_gitea_runner_config['cache']['port'] is defined %}
|
|
ports:
|
|
- target: {{ deploy_gitea_runner_config['cache']['port'] }}
|
|
published: {{ deploy_gitea_runner_config['cache']['port'] }}
|
|
protocol: tcp
|
|
mode: ingress
|
|
{%- endif %}
|
|
networks:
|
|
- internal
|
|
|
|
networks:
|
|
internal:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
data:
|
|
driver_opts:
|
|
o: bind
|
|
device: {{ deploy_gitea_runner_directory }}/data
|
|
type: none
|
|
{% if deploy_gitea_runner_config['cache']['enabled'] is defined and deploy_gitea_runner_config['cache']['enabled'] %}
|
|
cache:
|
|
driver_opts:
|
|
o: bind
|
|
device: {{ deploy_gitea_runner_directory }}/cache
|
|
type: none
|
|
{%- endif %}
|
|
|
|
configs:
|
|
config_yaml:
|
|
file: {{ deploy_gitea_runner_directory }}/config.yaml
|