feat: add a second forgejo runner
All checks were successful
All checks were successful
This commit is contained in:
parent
98723d25d9
commit
fbb81437d9
1 changed files with 23 additions and 12 deletions
|
|
@ -1,4 +1,17 @@
|
||||||
---
|
---
|
||||||
|
x-runner-common: &runner-common
|
||||||
|
image: code.forgejo.org/forgejo/runner:3.5.1
|
||||||
|
links:
|
||||||
|
- docker-in-docker
|
||||||
|
depends_on:
|
||||||
|
docker-in-docker:
|
||||||
|
condition: service_started
|
||||||
|
user: 1001:1001
|
||||||
|
restart: unless-stopped
|
||||||
|
command: '/bin/sh -c "sleep 5; forgejo-runner daemon"'
|
||||||
|
environment:
|
||||||
|
DOCKER_HOST: tcp://docker-in-docker:2375
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
forgejo:
|
forgejo:
|
||||||
external: false
|
external: false
|
||||||
|
|
@ -7,24 +20,22 @@ services:
|
||||||
docker-in-docker:
|
docker-in-docker:
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
container_name: 'docker_dind'
|
container_name: 'docker_dind'
|
||||||
privileged: 'true'
|
privileged: true
|
||||||
command: ['dockerd', '-H', 'tcp://0.0.0.0:2375', '--tls=false']
|
command: ['dockerd', '-H', 'tcp://0.0.0.0:2375', '--tls=false']
|
||||||
restart: 'unless-stopped'
|
restart: 'unless-stopped'
|
||||||
|
|
||||||
runner:
|
runner:
|
||||||
image: code.forgejo.org/forgejo/runner:3.5.1
|
<<: *runner-common
|
||||||
links:
|
|
||||||
- docker-in-docker
|
|
||||||
depends_on:
|
|
||||||
docker-in-docker:
|
|
||||||
condition: service_started
|
|
||||||
container_name: 'runner'
|
container_name: 'runner'
|
||||||
user: 1001:1001
|
|
||||||
restart: unless-stopped
|
|
||||||
command: '/bin/sh -c "sleep 5; forgejo-runner daemon"'
|
|
||||||
environment:
|
|
||||||
DOCKER_HOST: tcp://docker-in-docker:2375
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${FORGEJO_RUNNER_DATA:-/mnt/nas1/shared/forgejo-runner/data}:/data
|
- ${FORGEJO_RUNNER_DATA:-/mnt/nas1/shared/forgejo-runner/data}:/data
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
|
||||||
|
runner-2:
|
||||||
|
<<: *runner-common
|
||||||
|
container_name: 'runner2'
|
||||||
|
volumes:
|
||||||
|
- ${FORGEJO_RUNNER_DATA:-/mnt/nas1/shared/forgejo-runner/data2}:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue