mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
34fdba738e
The activation overlay's docker-compose.yml relied on a bind-mounted docker/init-db script to create the intelligence_app database, but the CLI copies only docker-compose.yml into scaffolded projects. The mount source never exists there, Docker creates it as an empty directory, postgres initializes without intelligence_app, and the composite's migrations fail: 'database "intelligence_app" does not exist' → 'dependency failed to start: container ...intelligence-1 is unhealthy'. Make the compose file self-contained: - Set POSTGRES_DB: intelligence_app (drop the init-db bind mount and the now-unused init script; the shadow DB it also created is only used by repo-local dev tooling, never by the composite). - Add an idempotent provision-db one-shot that creates the database when missing. POSTGRES_DB only applies on first init of an empty volume, and the volume is shared across all scaffolds via the fixed compose project name — so machines that already hit the bug have a data volume without the database. The one-shot heals those on the next 'docker compose up' with no manual 'down -v'. - Gate the composite on provision-db completion instead of postgres health, and align the postgres healthcheck dbname.
5.7 KiB
5.7 KiB