Default STACKS_HOST_DIR to /opt/stacks so host and container paths match

The shipped default (./data/stacks) guarantees the mismatch that hid stack data
from the file browser, the editor and (before 0.40.0) from backups: compose
resolves ./config against the container path, so the daemon creates the data
directories at /opt/stacks/<stack>/... on the host regardless of where
STACKS_HOST_DIR points. Same change for the agent, plus the reasoning in
.env.example and the README config table. Images unchanged (0.40.1).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
menzelj
2026-08-16 18:35:22 +00:00
co-authored by Claude Opus 5
parent 4c158e9407
commit 6af02a1367
4 changed files with 26 additions and 5 deletions
+7 -2
View File
@@ -3,8 +3,13 @@
SECRET_KEY=change-me-to-a-long-random-string
# Host directory where stack folders (compose.yaml + .env) are stored.
# This MUST be the same path on the host and is bind-mounted into the backend.
STACKS_HOST_DIR=./data/stacks
# It MUST be the same path as STACKS_DIR inside the container (/opt/stacks):
# compose runs in the backend container and resolves a stack's relative bind
# mounts (./config) against the *container* path, so the daemon creates those
# data directories at that path on the host. With a different host path here,
# every stack's data lands outside StackPilot's view — the file browser and the
# editor won't see it (backups capture it either way, via a helper container).
STACKS_HOST_DIR=/opt/stacks
# Allowed CORS origin(s) for the API (comma separated). The bundled frontend
# proxies /api, so this only matters if you call the API from another origin.