feat: update schema, improve shutdown and SDK logic

- Add columns to `client_sdks` and `admin_settings` tables
- Introduce `flushAndShutdownOnSignal` for graceful buffer shutdown
- Ensure database settings are hydrated before syncing SDKs
- Update documentation for SDK structure and volume mounts
This commit is contained in:
Team Dark Devil committed 2026-11-18 05:42:19 +06:00
1 parent 177ed4a844
commit 05407fd338
15 files changed
+1985 -3582

No files matched your search

+2 -2
View File
@@ -7,9 +7,9 @@ Production container definitions and orchestration for DataStack's multi-service
- `ingestion` (`Dockerfile.server`): Express + Socket.IO real-time ingestion server on port `4000` (runs as non-root user).
- `proxy` (`Dockerfile.proxy` + `coolify-nginx.conf`): Nginx reverse proxy on internal port `80`, forwarding `/socket.io/` to `ingestion:4000` and web traffic to `web:3000`.
- `postgres`: PostgreSQL 16 service with persistent `pgdata` volume storing `admin_users`, `admin_login_attempts`, `client_sdks`, and `admin_settings`.
- `redis`: Redis 7 service with persistent `redisdata` volume.
- `redis`: Redis 7 service with persistent `redisdata` volume (`--appendonly yes`).
## Shared Volumes & Networking
- Both `web` and `ingestion` mount the `datastack-data` volume at `/app/storage/data`, ensuring CSV partitions written by either process are immediately visible across the platform.
- Both `web` and `ingestion` mount the `datastack-data` volume at `/app/storage` (persisting `/app/storage/data/{clientId}/{YYYY-MM-DD}.csv`), ensuring CSV partitions written by either process are immediately visible across the platform.
- Both `web` and `ingestion` connect to `postgres` via `DATABASE_URL` over the private Compose network, synchronizing client registrations, revocation status, and runtime settings automatically.
- `web` communicates with `ingestion` via `INGESTION_INTERNAL_URL="http://ingestion:4000"` for live health metrics and manual buffer flushes.