11version : ' 2.3'
22
3+ x-helios-image : &helios-image
4+ image : ghcr.io/balena-io/helios:0.25.21
5+
36services :
47 # This service can only be named `main`, `balena-supervisor` or `core`
58 # in a multi-container supervisor, the API `supervisor_release` needs to be able to
@@ -8,10 +11,81 @@ services:
811 core :
912 build : ./
1013 privileged : true
11- tty : true
14+ tty : false
1215 restart : always
1316 network_mode : host
1417 labels :
1518 io.balena.features.balena-api : ' 1'
1619 io.balena.features.dbus : ' 1'
1720 io.balena.features.balena-socket : ' 1'
21+
22+ # This is the next generation supervisor service. When started, it becomes a proxy
23+ # for calls between the existing supervisor and the balenaAPI and containers
24+ core-next :
25+ << : *helios-image
26+ restart : on-failure
27+ # required to distinguish between stderr/stdout, the supervisor defaults to true
28+ tty : false
29+ labels :
30+ # Needed to get access to supervisor api variables
31+ # and credentials
32+ io.balena.features.supervisor-api : ' 1'
33+ # Needed for access to DOCKER_HOST
34+ io.balena.features.balena-socket : ' 1'
35+ # Needed to stop the supervisor service
36+ io.balena.features.dbus : ' 1'
37+ # Needed to get access to the API credentials
38+ io.balena.features.balena-api : ' 1'
39+ # Needed to get Host OS metadata
40+ io.balena.features.host-os.board-rev : ' 1'
41+ environment :
42+ - DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
43+ # Needed for locks and balenahup. This needs to match the device
44+ # used for the `runtime` volume
45+ - BALENA_HOST_RUNTIME_DIR=/tmp/balena-supervisor
46+ # Only send error logs to dashboard
47+ - BALENA_LOGS_LEVEL=error
48+ volumes :
49+ # Critical configurations
50+ - config:/config/helios
51+ # Request caching
52+ - cache:/cache/helios
53+ # Persistent system state data that can be reconstructed from
54+ # the target state
55+ - state:/local/helios
56+ # Runtime directory. Data here does not persist after reboots
57+ - runtime:/tmp/run
58+
59+ # The service below relays requests between tcp port 48484 and the socket exposed by
60+ # the core-next service
61+ service-relay :
62+ << : *helios-image
63+ command : socat TCP-LISTEN:48484,reuseaddr,fork UNIX-CONNECT:/tmp/run/helios.sock
64+ # required to distinguish between stderr/stdout, the supervisor defaults to true
65+ tty : false
66+ ports :
67+ - 48484
68+ depends_on :
69+ - core
70+ volumes :
71+ - runtime:/tmp/run
72+ environment :
73+ # Only send error logs to dashboard
74+ - BALENA_LOGS_LEVEL=error
75+ healthcheck :
76+ test : ['CMD', 'wget', '-O', '-', '-q', 'http://127.0.0.1:48484/ping']
77+
78+ volumes :
79+ config :
80+ state :
81+ labels :
82+ # the database version, can be bumped to re-create the state
83+ io.balena.private.db-version : 0
84+ cache :
85+ runtime :
86+ driver : local
87+ driver_opts :
88+ type : none
89+ o : bind
90+ # XXX: this directory needs to exist on the host before the container is started
91+ device : /tmp/balena-supervisor
0 commit comments