-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcompose.probe.yaml
More file actions
41 lines (39 loc) · 1.19 KB
/
Copy pathcompose.probe.yaml
File metadata and controls
41 lines (39 loc) · 1.19 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
name: ronin-probe
services:
server:
image: ${RONIN_PROBE_IMAGE:-ronin-probe:dev}
command: ["python", "/app/bootstrap_server.py"]
environment:
RONIN_PORT: "8080"
RONIN_WORKSPACE_ROOT: ${RONIN_HOST_WORKSPACE:?set RONIN_HOST_WORKSPACE}
volumes:
- ${RONIN_HOST_WORKSPACE}:${RONIN_HOST_WORKSPACE}:ro
ports:
- "127.0.0.1:18080:8080"
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8080/healthz', timeout=2).status == 200 else 1)",
]
interval: 2s
timeout: 3s
retries: 30
start_period: 2s
restart: "no"
worker:
image: ${RONIN_PROBE_IMAGE:-ronin-probe:dev}
command: ["python", "-c", "import time; time.sleep(3600)"]
environment:
RONIN_WORKSPACE_ROOT: ${RONIN_HOST_WORKSPACE:?set RONIN_HOST_WORKSPACE}
group_add:
- "${DOCKER_GID:?set DOCKER_GID from /var/run/docker.sock}"
volumes:
- ${RONIN_HOST_WORKSPACE}:${RONIN_HOST_WORKSPACE}:ro
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
server:
condition: service_healthy
restart: "no"