From a94ae1889a2cf8de873d00cdc66fece369340034 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Sat, 3 Oct 2026 10:21:18 +0200 Subject: [PATCH] feat(infra): add CasaOS compose with persistent /DATA bind CasaOS copies imported compose files to /tmp/casaos-compose-app-* and runs them from there, so the repo compose's relative ./data bind fails at install ("bind source path does not exist") and would be wiped on reboot. infra/compose.casaos.yaml mounts /DATA/AppData/dash instead and carries x-casaos metadata for the app tile. Authored By: TDvorak Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++ docker-compose.yml | 2 ++ docs/installation.md | 13 +++++++++ infra/compose.casaos.yaml | 57 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 infra/compose.casaos.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 99e1523..2fa3bcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ All notable changes to Dash. Format follows ## [Unreleased] +### Added + +- CasaOS deployment file `infra/compose.casaos.yaml` with app-store + (`x-casaos`) metadata and a persistent `/DATA/AppData/dash` bind mount; + the repo compose's relative `./data` fails under CasaOS, which runs + compose from `/tmp` and loses it on reboot + ## [2.1.0] — 2026-09-23 ### Added diff --git a/docker-compose.yml b/docker-compose.yml index c535a5e..16b12bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,5 +9,7 @@ services: ports: - "3000:3000" volumes: + # CasaOS: use infra/compose.casaos.yaml — CasaOS runs compose from /tmp, + # so this relative path fails there and would not survive a reboot. - ./data:/data restart: unless-stopped diff --git a/docs/installation.md b/docs/installation.md index c543cc1..e431758 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -43,6 +43,19 @@ To build the image locally instead of pulling: docker compose up --build ``` +## CasaOS + +Do not paste `docker-compose.yml` into CasaOS's custom install. CasaOS copies +imported compose files to `/tmp/casaos-compose-app-*` and runs them there, so +the relative `./data` bind resolves under `/tmp` — install fails with +`bind source path does not exist`, and anything written would be wiped on +reboot anyway. + +Use `infra/compose.casaos.yaml` instead (Apps → Custom Install → Import). It +mounts `/DATA/AppData/dash` on the host — persistent across reboots and +browsable in the CasaOS Files app — and carries the `x-casaos` metadata the +app tile uses. + ## Binary Release archives contain a static `dash` binary (no CGO, no dependencies). diff --git a/infra/compose.casaos.yaml b/infra/compose.casaos.yaml new file mode 100644 index 0000000..b74ea3e --- /dev/null +++ b/infra/compose.casaos.yaml @@ -0,0 +1,57 @@ +# CasaOS-ready compose. Import via Apps -> Custom Install -> Import from file. +# +# Do NOT paste the repo's docker-compose.yml into CasaOS: it copies imported +# files to /tmp/casaos-compose-app-* and runs them there, so a relative +# "./data" bind resolves under /tmp — install fails with "bind source path +# does not exist", and even if created the data dies on reboot. This file +# binds /DATA/AppData/dash instead — CasaOS's persistent app-data root, +# browsable in the Files app. +name: dash + +services: + dash: + image: ghcr.io/dvorinka/dash:latest + container_name: dash + restart: unless-stopped + ports: + - "3000:3000" + environment: + - TZ=${TZ:-UTC} + volumes: + # Short-form bind auto-creates the host dir; long-form "type: bind" does + # not unless bind.create_host_path is set. + - /DATA/AppData/dash:/data + x-casaos: + envs: + - container: TZ + description: + en_us: "Timezone, e.g. Europe/Prague" + ports: + - container: "3000" + description: + en_us: "Web UI and API" + volumes: + - container: /data + description: + en_us: "All Dash state: SQLite database and uploaded icons" + +x-casaos: + architectures: + - amd64 + - arm64 + main: dash + author: Dvorinka + category: Dashboard + developer: Dvorinka + description: + en_us: "Self-hosted homelab dashboard: services, uptime monitors, domain watch, system metrics. Single container, all state in /data." + icon: https://raw.githubusercontent.com/Dvorinka/Dash/main/dash.svg + tagline: + en_us: "Homelab dashboard in a single container" + thumbnail: "" + title: + en_us: Dash + scheme: http + port_map: "3000" + index: / + store_app_id: dash