-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) Β· 1.82 KB
/
Copy pathdocker-compose.yml
File metadata and controls
45 lines (42 loc) Β· 1.82 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
# devbox hub β drop-in for a NAS (TrueNAS SCALE, Synology, unRAID, any Docker host).
#
# docker compose up -d # pulls the published image, hub on :8088
# docker compose up -d --build # build from local source instead
# docker compose exec hub devbox-hub token --data /data # mint a join token
# docker compose logs -f hub
#
# Devices then: devbox setup (point them at http://<nas-ip>:8088)
services:
hub:
# Published image is the default; `--build` rebuilds from the local source tree.
image: git.shoemoney.ai/shoemoney/devbox-hub:latest
build: .
container_name: devbox-hub
restart: unless-stopped # keep-alive + auto-restart + recover (crash & reboot)
ports:
- "8088:8088" # hub API
# - "8099:8099" # live dashboard β uncomment AND enable it in `command:` below
volumes:
- devbox-data:/data # snapshots, blobs, token DB β survives upgrades
# Default serves the hub. To enable the live dashboard, swap in this command:
# command: ["serve","--data","/data","--listen","0.0.0.0:8088","--dashboard","--dashboard-addr","0.0.0.0:8099"]
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8088/metrics"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Optional self-heal: restarts the hub if its healthcheck goes unhealthy (Docker's
# restart policy only catches crashes, not a wedged-but-running process). Enable with:
# docker compose --profile selfheal up -d
autoheal:
image: willfarrell/autoheal:latest
container_name: devbox-autoheal
restart: unless-stopped
profiles: ["selfheal"]
environment:
AUTOHEAL_CONTAINER_LABEL: all
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
devbox-data: