-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
117 lines (109 loc) · 2.96 KB
/
docker-compose.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: "3.7"
x-common: &common
stop_grace_period: 5s
logging:
options:
max-size: "250k"
max-file: "10"
labels:
- "nuvlabox.component=True"
- "nuvlabox.deployment=production"
volumes:
nuvlaedge-db:
driver: local
labels:
- "nuvlabox.volume=True"
- "nuvlabox.deployment=production"
services:
system-manager:
<<: *common
image: nuvlabox/system-manager:2.4.0
restart: always
environment:
- SKIP_MINIMUM_REQUIREMENTS=${SKIP_MINIMUM_REQUIREMENTS:-False}
- NUVLABOX_DATA_GATEWAY_IMAGE=${NUVLABOX_DATA_GATEWAY_IMAGE:-eclipse-mosquitto:1.6.12}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- nuvlaedge-db:/srv/nuvlabox/shared
depends_on:
- on-stop
agent:
<<: *common
image: nuvlabox/agent:2.8.0
restart: always
oom_kill_disable: true
privileged: true
environment:
- NUVLABOX_API_KEY=${NUVLABOX_API_KEY}
- NUVLABOX_API_SECRET=${NUVLABOX_API_SECRET}
- NUVLABOX_UUID=${NUVLABOX_UUID}
- NUVLABOX_ENGINE_VERSION=2.4.0
- NUVLABOX_IMMUTABLE_SSH_PUB_KEY=${NUVLABOX_SSH_PUB_KEY}
- HOST_HOME=${HOME}
- VPN_INTERFACE_NAME=${VPN_INTERFACE_NAME:-vpn}
- NUVLA_ENDPOINT=${NUVLA_ENDPOINT:-nuvla.io}
- NUVLA_ENDPOINT_INSECURE=${NUVLA_ENDPOINT_INSECURE:-False}
- COMPUTE_API_PORT=${JOB_PORT:-5000}
- EXCLUDED_MONITORS=${EXCLUDED_MONITORS:-geolocation}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- nuvlaedge-db:/srv/nuvlabox/shared
- /:/rootfs:ro
ports:
- 127.0.0.1:${AGENT_PORT}:80
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/api/healthcheck"]
interval: 30s
timeout: 10s
retries: 4
start_period: 10s
depends_on:
- compute-api
compute-api:
<<: *common
image: nuvlabox/compute-api:1.2.0
container_name: ${COMPOSE_PROJECT_NAME}_compute-api
restart: on-failure
oom_score_adj: -900
pid: "host"
environment:
- HOST=${HOSTNAME:-nuvlabox}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- nuvlaedge-db:/srv/nuvlabox/shared
ports:
- ${JOB_PORT:-5000}:5000
healthcheck:
test: netstat -tulpn | grep LISTEN | grep 5000 | grep socat
interval: 20s
timeout: 10s
start_period: 30s
vpn-client:
<<: *common
image: nuvlabox/vpn-client:1.1.0
restart: always
oom_kill_disable: true
network_mode: host
privileged: true
devices:
- /dev/net/tun
environment:
- NUVLABOX_UUID=${NUVLABOX_UUID}
volumes:
- nuvlaedge-db:/srv/nuvlabox/shared
depends_on:
- agent
job-engine-lite:
<<: *common
image: nuvla/job-lite:3.1.0
restart: always
entrypoint: /app/pause.py
volumes:
- /var/run/docker.sock:/var/run/docker.sock
on-stop:
<<: *common
image: nuvlabox/on-stop:1.1.0
restart: always
command: pause
volumes:
- /var/run/docker.sock:/var/run/docker.sock