configs/forgejo/runner/docker-compose.yaml

36 lines
904 B
YAML
Raw Normal View History

2024-06-29 06:33:10 +00:00
version: '3.8'
services:
docker-in-docker:
image: docker:dind
container_name: 'docker_dind'
privileged: 'true'
2024-06-29 08:03:48 +00:00
command:
- 'dockerd'
- '-H'
- 'tcp://0.0.0.0:2375'
- '--tls=false'
2024-06-29 06:33:10 +00:00
restart: 'unless-stopped'
2024-06-29 07:58:11 +00:00
volumes:
- /home/forgejo-runner/artifacts:/artifacts
2024-06-29 08:03:48 +00:00
2024-06-29 06:33:10 +00:00
gitea:
image: 'code.forgejo.org/forgejo/runner:3.4.1'
links:
- docker-in-docker
depends_on:
docker-in-docker:
condition: service_started
container_name: 'runner'
environment:
DOCKER_HOST: tcp://docker-in-docker:2375
# User without root privileges, but with access to `./data`.
2024-06-29 06:51:12 +00:00
user: 1000:1000
2024-06-29 06:33:10 +00:00
volumes:
- /home/forgejo-runner/data:/data
2024-06-29 07:58:11 +00:00
- /home/forgejo-runner/artifacts:/artifacts
2024-06-29 06:33:10 +00:00
restart: 'unless-stopped'
2024-06-29 07:24:59 +00:00
expose:
- "8080"
2024-06-29 06:33:10 +00:00
2024-06-29 07:15:39 +00:00
command: '/bin/sh -c "sleep 5; forgejo-runner daemon --config config.yml"'