Files
GoClaw/docker/entrypoint.sh
¨NW¨ 7c01bc4272 fix(prod): simplify entrypoint — make drizzle-kit migrate non-fatal
drizzle-kit migrate hangs in Alpine container because it needs tsx
to run drizzle.config.ts. Tables already exist from previous deployments.
Seed handles schema idempotently.
2026-04-08 23:55:46 +01:00

21 lines
626 B
Bash

#!/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