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

This reverts commit 57ebd76070.
This commit is contained in:
Kpa-clawbot committed 2026-03-30 10:00:17 -07:00
1 parent 57ebd76070
commit 61ff72fc80
5 files changed
+41 -110

No files matched your search

+7 -6
View File
@@ -264,7 +264,8 @@ jobs:
- name: Deploy staging
run: |
# Stop old container and release memory
# Use docker compose down (not just stop/rm) to properly clean up
# the old container, network, and release memory before starting new one
docker compose -f "$STAGING_COMPOSE_FILE" -p corescope-staging down --timeout 30 2>/dev/null || true
# Wait for container to be fully gone and OS to reclaim memory (3GB limit)
@@ -276,14 +277,14 @@ jobs:
done
sleep 5 # extra pause for OS memory reclaim
# Ensure staging data dir exists (config.json lives here, no separate file mount)
# Ensure staging config exists (docker creates a directory if bind mount source missing)
STAGING_DATA="${STAGING_DATA_DIR:-$HOME/meshcore-staging-data}"
mkdir -p "$STAGING_DATA"
# If no config exists, copy the example (CI doesn't have a real prod config)
# Remove directory-masquerading-as-file left by failed docker mount
[ -d "$STAGING_DATA/config.json" ] && rm -rf "$STAGING_DATA/config.json"
if [ ! -f "$STAGING_DATA/config.json" ]; then
echo "Staging config missing — copying config.example.json"
cp config.example.json "$STAGING_DATA/config.json" 2>/dev/null || true
echo "Staging config missing — copying from repo config.json"
cp config.json "$STAGING_DATA/config.json" 2>/dev/null || cp config.example.json "$STAGING_DATA/config.json"
fi
docker compose -f "$STAGING_COMPOSE_FILE" -p corescope-staging up -d staging-go