Initial infra setup: Terraform, Ansible, backup roles
This commit is contained in:
17
ansible/roles/gitea-runner/templates/config.yml.j2
Normal file
17
ansible/roles/gitea-runner/templates/config.yml.j2
Normal file
@@ -0,0 +1,17 @@
|
||||
log:
|
||||
level: info
|
||||
|
||||
runner:
|
||||
file: /data/.runner
|
||||
capacity: 2 # max concurrent jobs — lower if droplet is under load
|
||||
labels:
|
||||
- "ubuntu-latest:docker://node:20"
|
||||
- "ubuntu-22.04:docker://node:20"
|
||||
|
||||
cache:
|
||||
enabled: true
|
||||
dir: /data/cache
|
||||
|
||||
container:
|
||||
network: bridge
|
||||
force_pull: false # reuse cached images to speed up builds
|
||||
14
ansible/roles/gitea-runner/templates/docker-compose.yml.j2
Normal file
14
ansible/roles/gitea-runner/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
gitea-runner:
|
||||
image: gitea/act_runner:{{ gitea_runner_version }}
|
||||
container_name: gitea-runner
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- {{ gitea_runner_data_dir }}/config.yml:/config.yml
|
||||
- {{ gitea_runner_data_dir }}/data:/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock # allows runner to spin up job containers
|
||||
environment:
|
||||
CONFIG_FILE: /config.yml
|
||||
GITEA_INSTANCE_URL: "{{ gitea_instance_url }}"
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN: "{{ gitea_runner_token }}"
|
||||
GITEA_RUNNER_NAME: "{{ gitea_runner_name }}"
|
||||
Reference in New Issue
Block a user