#!/bin/sh set -eu # Ensure persistent state dirs exist (volume may be empty on first boot). mkdir -p /app/state/uploads # Bootstrap on first run: create data.db and apply migrations. # emdash init is expected to be idempotent on subsequent boots. if [ ! -f /app/state/data.db ]; then echo "[entrypoint] no data.db found in /app/state, running emdash init" node_modules/.bin/emdash init fi exec "$@"