Some checks are pending
CI / vet-build-test (push) Waiting to run
- build-release.sh: add linux/arm64 (Raspberry Pi!) + linux/arm targets — the curl|sh install on a clean Pi needs a real arm64 asset to download. - scripts/release.sh: one-shot local release. Cross-compiles, then creates/updates the Forgejo release and uploads de-versioned assets (devbox_<os>_<arch>) that install.sh fetches directly. No CI runner required. - .forgejo + .github CI workflows: go vet + build + test -race on push/PR; on vX.Y.Z tag, build-release + publish. GitHub's runs on hosted runners today. - docker-compose: pull the published hub image by default; --build for local source.
45 lines
1.8 KiB
YAML
45 lines
1.8 KiB
YAML
# 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:
|