fix docker mounts — data dir + env path vars

This commit is contained in:
2026-08-03 19:13:16 +02:00
parent fe21d8c721
commit 0764cfe14a
3 changed files with 20 additions and 28 deletions
+3 -14
View File
@@ -1,17 +1,6 @@
#!/bin/sh
set -e
# If Docker created these paths as directories (because the host file didn't exist),
# remove them and create proper JSON files.
for f in /app/colony.json /app/decks.json; do
if [ -d "$f" ]; then
rm -rf "$f"
fi
if [ ! -f "$f" ]; then
echo '{}' > "$f"
fi
done
mkdir -p /app/assets/deck-images
mkdir -p /app/data /app/assets/deck-images
[ -f /app/data/colony.json ] || echo '{"games":[]}' > /app/data/colony.json
[ -f /app/data/decks.json ] || echo '{"decks":[]}' > /app/data/decks.json
exec node server.js