|
1 | 1 | # Intelligence infrastructure for threads support. |
2 | 2 | # |
3 | | -# Starts postgres, redis, runs DB migrations, and the intelligence |
4 | | -# app-api + realtime-gateway services. |
| 3 | +# Starts postgres, redis, and the all-in-one intelligence composite |
| 4 | +# container (runs app-api, realtime-gateway, thread-culler, and the |
| 5 | +# db-migrations oneshot internally under s6-overlay). |
5 | 6 | # |
6 | 7 | # Usage: |
7 | 8 | # docker compose up -d --wait |
@@ -52,96 +53,30 @@ services: |
52 | 53 | - intelligence |
53 | 54 |
|
54 | 55 | # --------------------------------------------------------------------------- |
55 | | - # Database migrations (runs once then exits) |
| 56 | + # Intelligence composite (app-api + realtime-gateway + thread-culler + |
| 57 | + # db-migrations, all in one container under s6-overlay) |
56 | 58 | # --------------------------------------------------------------------------- |
57 | 59 |
|
58 | | - db-migrations: |
59 | | - image: ghcr.io/copilotkit/intelligence/db-migrations:0.1.0-rc.7 |
60 | | - environment: |
61 | | - DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app |
62 | | - depends_on: |
63 | | - postgres: |
64 | | - condition: service_healthy |
65 | | - restart: "no" |
66 | | - networks: |
67 | | - - intelligence |
68 | | - |
69 | | - # --------------------------------------------------------------------------- |
70 | | - # Intelligence services |
71 | | - # --------------------------------------------------------------------------- |
72 | | - |
73 | | - app-api: |
74 | | - image: ghcr.io/copilotkit/intelligence/app-api:0.1.0-rc.7 |
| 60 | + intelligence: |
| 61 | + image: ghcr.io/copilotkit/intelligence/composite:0.0.0-ghcr.20260422.1 |
75 | 62 | ports: |
76 | 63 | - "${APP_API_HOST_PORT:-4201}:4201" |
77 | | - environment: |
78 | | - NODE_ENV: development |
79 | | - HOST: 0.0.0.0 |
80 | | - PORT: 4201 |
81 | | - LOG_LEVEL: debug |
82 | | - DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app |
83 | | - REDIS_URL: redis://redis:6379 |
84 | | - AUTH_SECRET: local-dev-secret-must-be-at-least-32-chars |
85 | | - AUTH_TRUST_HOST: "true" |
86 | | - DEPLOYMENT_MODE: self-hosted |
87 | | - DEFAULT_ORGANIZATION_ID: casa-de-erlang |
88 | | - depends_on: |
89 | | - postgres: |
90 | | - condition: service_healthy |
91 | | - redis: |
92 | | - condition: service_healthy |
93 | | - db-migrations: |
94 | | - condition: service_completed_successfully |
95 | | - restart: unless-stopped |
96 | | - networks: |
97 | | - - intelligence |
98 | | - |
99 | | - realtime-gateway: |
100 | | - image: ghcr.io/copilotkit/intelligence/realtime-gateway:0.1.0-rc.7 |
101 | | - ports: |
102 | 64 | - "${REALTIME_GATEWAY_HOST_PORT:-4401}:4401" |
103 | 65 | environment: |
104 | 66 | DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app |
105 | 67 | REDIS_URL: redis://redis:6379 |
| 68 | + AUTH_SECRET: local-dev-secret-must-be-at-least-32-chars |
106 | 69 | RUNNER_AUTH_SECRET: dev-runner-secret |
107 | 70 | SECRET_KEY_BASE: local-realtime-gateway-secret-key-base-at-least-64-bytes-long-for-dev |
108 | | - PHX_HOST: localhost |
109 | | - PORT: 4401 |
110 | | - depends_on: |
111 | | - postgres: |
112 | | - condition: service_healthy |
113 | | - redis: |
114 | | - condition: service_healthy |
115 | | - db-migrations: |
116 | | - condition: service_completed_successfully |
117 | | - healthcheck: |
118 | | - test: ["CMD-SHELL", "nc -z 127.0.0.1 4401"] |
119 | | - interval: 10s |
120 | | - timeout: 5s |
121 | | - retries: 5 |
122 | | - start_period: 20s |
123 | | - restart: unless-stopped |
124 | | - networks: |
125 | | - - intelligence |
126 | | - |
127 | | - thread-culler: |
128 | | - image: ghcr.io/copilotkit/intelligence/thread-culler:0.1.0-rc.7 |
129 | | - command: |
130 | | - [ |
131 | | - "sh", |
132 | | - "-lc", |
133 | | - "while true; do node dist/apps/thread-culler/main.mjs; sleep 3600; done", |
134 | | - ] |
135 | | - environment: |
136 | | - DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app |
| 71 | + DEFAULT_ORGANIZATION_ID: casa-de-erlang |
137 | 72 | COPILOTKIT_LICENSE_TOKEN: "${COPILOTKIT_LICENSE_TOKEN:-}" |
138 | 73 | THREAD_STALE_HOURS: "${THREAD_STALE_HOURS:-3}" |
139 | 74 | THREAD_CULL_BATCH_SIZE: "${THREAD_CULL_BATCH_SIZE:-1000}" |
140 | 75 | depends_on: |
141 | 76 | postgres: |
142 | 77 | condition: service_healthy |
143 | | - db-migrations: |
144 | | - condition: service_completed_successfully |
| 78 | + redis: |
| 79 | + condition: service_healthy |
145 | 80 | restart: unless-stopped |
146 | 81 | networks: |
147 | 82 | - intelligence |
|
0 commit comments