mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-06-05 06:01:31 +00:00
fix: config.json lives in /app/data/ volume, not baked into image
- entrypoint copies example config to /app/data/config.json on first run - symlinks /app/config.json → /app/data/config.json so app code unchanged - theme.json also symlinked from /app/data/ if present - config persists across container rebuilds without extra bind mounts - updated README with new config/theme instructions
This commit is contained in:
+12
-4
@@ -1,9 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copy example config if no config.json exists
|
||||
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
|
||||
# Copy example config if no config.json exists (check volume mount first)
|
||||
if [ ! -f /app/data/config.json ]; then
|
||||
echo "[entrypoint] No config.json found in /app/data/, copying example"
|
||||
cp /app/config.example.json /app/data/config.json
|
||||
fi
|
||||
|
||||
# Symlink so the app finds it at /app/config.json
|
||||
ln -sf /app/data/config.json /app/config.json
|
||||
|
||||
# Same for theme.json (optional)
|
||||
if [ -f /app/data/theme.json ]; then
|
||||
ln -sf /app/data/theme.json /app/theme.json
|
||||
fi
|
||||
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
Reference in New Issue
Block a user