Maximum-easy adoption: - install.sh (macOS+Linux): curl|sh friendly. Detects OS/arch, resolves the binary (env → local dist/ → download → go-build fallback), lets you pick the install dir (smart default + prompt on a TTY), and optionally sets up a KEEP-ALIVE auto-restart service — launchd KeepAlive (mac) / systemd Restart=always user unit (linux). Flags + env for non-interactive use. - install.ps1 (Windows): copy exe + user PATH + optional restart-on-failure Scheduled Task at logon. - Hub Docker: Dockerfile (multi-stage, static CGO-free, alpine, healthcheck- ready) + docker-compose.yml (restart: unless-stopped = self-heal, named volume, dashboard-ready, optional autoheal profile for unhealthy-restart) + .dockerignore — drop-in for TrueNAS/Synology/unRAID. - macOS Full Disk Access: 'devbox doctor' now tests the ACTUAL protected mount paths (~/Desktop, ~/Documents, ~/Downloads, iCloud) and flags any it can't read, with the exact System Settings fix + a deep link; install.sh points to it on mac. Windows install.ps1 notes Controlled Folder Access (off by default). (TCC.db probe was unreliable across macOS versions — testing the real mounts is honest + version-proof.) shellcheck-clean; 18 pkgs -race green; win+mac build.
44 lines
1.7 KiB
YAML
44 lines
1.7 KiB
YAML
# devbox hub — drop-in for a NAS (TrueNAS SCALE, Synology, unRAID, any Docker host).
|
|
#
|
|
# docker compose up -d --build # hub on :8088, data persisted, self-healing
|
|
# 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:
|
|
build: .
|
|
# Prefer a published image once you have one:
|
|
# image: git.shoemoney.ai/shoemoney/devbox-hub:latest
|
|
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:
|