-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (65 loc) · 1.56 KB
/
docker-compose.yml
File metadata and controls
67 lines (65 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
runner:
build:
context: .
args:
RUNNER_HOME: ${RUNNER_HOME:-/opt/actions-runner}
platforms:
- linux/amd64
depends_on:
- socat
deploy:
mode: replicated
replicas: ${REPLICAS:-2}
resources:
limits:
cpus: '2'
memory: 6144M
reservations:
cpus: '0.5'
memory: 1024M
restart_policy:
condition: any
delay: 1s
entrypoint: ["./start.sh"]
environment:
ACCESS_TOKEN_SECRET_FILE: /secrets/access_token
DOCKER_HOST: socat:2375
LABELS: ${LABELS}
ORGANISATION: ${ORGANISATION}
RUNNER_GROUP: ${RUNNER_GROUP:-default}
RUNNER_HOME: ${RUNNER_HOME:-/opt/actions-runner}
RUNNER_USER: ${RUNNER_USER:-github}
healthcheck:
test: |
pgrep -f "run.sh" > /dev/null &&
pgrep -f "run-helper.sh" > /dev/null &&
pgrep -f "Runner.Listener" > /dev/null
interval: 5s
timeout: 5s
retries: 3
start_period: 60s
secrets:
- source: access_token
target: /secrets/access_token
user: root
volumes:
- type: tmpfs
target: /secrets
tmpfs:
mode: 0400
socat:
image: alpine/socat
command: tcp-listen:2375,fork,reuseaddr unix-connect:/var/run/docker.sock
deploy:
restart_policy:
condition: any
user: root
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
read_only: true
secrets:
access_token:
file: ./access_token.txt