#!/bin/sh set -e mkdir -p /app/data /app/data/deck-images # Docker creates directories instead of files when a bind-mount target doesn't exist. # Remove them so we can create proper JSON files. for f in /app/data/colony.json /app/data/decks.json; do [ -d "$f" ] && rm -rf "$f" [ -f "$f" ] || echo '{}' > "$f" done exec node server.js