3.1 KiB
3.1 KiB
Docker Deployment Manifest
Purpose
Production container definitions for the split architecture:
web: standalone Next.js frontend and admin console on port 3000, running as a non-root user.ingestion: Express + Socket.IO process on port 4000, running as a non-root user.proxy: Nginx reverse proxy on internal port 80. Coolify routes the public domain to this service;/socket.io/is forwarded to ingestion and other paths to web.redis: private Compose service reserved for the planned shared-buffer integration; current application code does not consume it.postgres: private Compose service; the first-run admin setup/login helper stores the single bootstrap admin credential inadmin_usersusingpg. Prisma-backed client/settings/audit metadata is not wired yet. Collected events must remain in CSV files.
Coolify Compose Deployment
- Create a Git-based Docker Compose application from branch
main. - Set Base Directory to
/dockerand Compose Location to/docker/docker-compose.yml. Confirm the resolved file remains the repository'sdocker/docker-compose.yml. The/dockerproject directory is required because each service usesbuild.context: ..to reach the repository root; using/makes that context escape the checkout. - Set
DATASTACK_ADMIN_EMAILin Coolify. Compose uses generatedSERVICE_HEX_32_DATABASENAME,SERVICE_PASSWORD_64_POSTGRES,SERVICE_REALBASE64_64_JWT,SERVICE_REALBASE64_64_ADMINSESSION, andSERVICE_REALBASE64_64_ADMININSTALL;DATABASE_URLis assembled from the generated DB name/password. - On first visit, copy
SERVICE_REALBASE64_64_ADMININSTALLfrom Coolify into/vcon/setup, confirm theDATASTACK_ADMIN_EMAILconfigured in Coolify, choose the first admin password, and keep generated secrets in Coolify. The API enforces the configured email and setup closes after the first account is persisted. - Add the public domain to service
proxyat internal port80. Coolify manages proxy labels in its normal Compose mode; do not enable Raw Compose mode or add direct host port mappings. - The
web,ingestion, Redis, and PostgreSQL services are private on the Compose network. Only the proxy is exposed to Coolify's domain proxy. - The
datastack-datanamed volume stores ingestion CSVs;pgdatastores PostgreSQL files and the bootstrap admin credential. Compose configures these named volumes for persistence; verify restart/redeploy behavior in the target Coolify runtime before relying on it. Do not delete the volumes or regenerate the DB name for an existing deployment. Back up before DB upgrades. DB password rotation requires changing the DB role as well as the Coolify value. - The web container does not yet share/read
datastack-data, and Redis is not wired into runtime code. Prisma-backed client/settings metadata remains future work; cross-process reads and general metadata durability are not established by these images. - Health checks probe the web landing route, ingestion
/health, proxy route, Redis ping, and PostgreSQL readiness using the generatedPOSTGRES_DBname. These checks do not establish application-level shared-storage readiness.