#!/bin/sh # GoClaw Control Center entrypoint # Starts the Node.js server — migrations handled by drizzle-kit push or seed set -e echo "[Entrypoint] GoClaw Control Center starting..." # Run drizzle-kit migrate if available (non-fatal — tables may already exist) if command -v npx >/dev/null 2>&1; then echo "[Entrypoint] Running database migrations..." cd /app && npx drizzle-kit migrate 2>&1 || { echo "[Entrypoint] Migration failed or not needed — continuing startup" } else echo "[Entrypoint] npx not available — skipping migrations" fi echo "[Entrypoint] Starting server..." exec node dist/index.js