fix: config.json lives in data dir, not bind-mounted as file

Removes the separate config.json file bind mount from both compose
files. The data directory mount already covers it, and the Go server
searches /app/data/config.json via LoadConfig.

- Entrypoint symlinks /app/data/config.json for ingestor compatibility
- manage.sh setup creates config in data dir, prompts admin if missing
- manage.sh start checks config exists before starting, offers to create
- deploy.yml simplified — no more sudo rm or directory cleanup
- Backup/restore updated to use data dir path

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Kpa-clawbot
2026-03-30 09:58:22 -07:00
parent 86b5d4e175
commit 57ebd76070
5 changed files with 110 additions and 41 deletions
+7 -11
View File
@@ -1,16 +1,12 @@
#!/bin/sh
# Fix: Docker creates a directory when bind-mounting a non-existent file.
# If config.json is a directory (from a failed mount), remove it and use the example.
if [ -d /app/config.json ]; then
echo "[entrypoint] WARNING: config.json is a directory (broken bind mount) — removing and using example"
rm -rf /app/config.json
fi
# Copy example config if no config.json exists (not bind-mounted)
if [ ! -f /app/config.json ]; then
echo "[entrypoint] No config.json found, copying from config.example.json"
cp /app/config.example.json /app/config.json
# Config lives in the data directory (bind-mounted from host)
# The Go server already searches /app/data/config.json via LoadConfig
# but the ingestor expects a direct path — symlink for compatibility
if [ -f /app/data/config.json ]; then
ln -sf /app/data/config.json /app/config.json
elif [ ! -f /app/config.json ]; then
echo "[entrypoint] No config.json found in /app/data/ — using built-in defaults"
fi
# theme.json: check data/ volume (admin-editable on host)