mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-06-05 01:01:26 +00:00
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:
+7
-11
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user