Features: - Keep-alive connections (no random disconnects) - Zero timeout (never cuts off) - Auto-retry with exponential backoff (5 attempts) - Works as CLI and Node.js module Commands: - health: Check API status - collections: List all collections - schema: Export full schema - read <coll>: Query collection - count <coll>: Count items - insert <coll>: Create item from stdin No yaml edits - pure JS utility
description
| description |
|---|
| Learn how to manage deployment scripts and database migrations |
Scripts & Automation
This directory contains utility scripts for managing the Spark Platform.
Core Scripts
deploy.sh: (Legacy) Basic shell script for deployment. We now use Coolify.seed.ts: Database seeder (if applicable).
Deployment
We use Coolify for all deployments. The Dockerfile in the root determines the build process.
- Frontend: Built via
npm run build(Astro). - Backend: Directus via Docker Image.
Database Migrations
Directus handles migrations internally.
- To export schema:
npx directus schema snapshot ./schema.yaml - To apply schema:
npx directus schema apply ./schema.yaml
⚠️ Important Notes
- Do NOT modify
docker-compose.ymlmanually on the server. Use Coolify UI. - Environment Variables: Managed in Coolify. See
.env.examplefor required keys. - Onboarding: See
SPARK_ONBOARDING.mdin the root for the full developer guide.