forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
155 lines (143 loc) · 4.38 KB
/
Copy pathdocker-compose.yml
File metadata and controls
155 lines (143 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Intelligence infrastructure for threads support.
#
# Starts postgres, redis, runs DB migrations, and the intelligence
# app-api + realtime-gateway services.
#
# Usage:
# docker compose up -d --wait
#
# Then start the app services on the host:
# npm run dev
name: langgraph-python-intelligence
services:
# ---------------------------------------------------------------------------
# Infrastructure
# ---------------------------------------------------------------------------
postgres:
image: postgres:16-alpine
ports:
- "${POSTGRES_HOST_PORT:-5432}:5432"
environment:
POSTGRES_USER: intelligence
POSTGRES_PASSWORD: intelligence
POSTGRES_DB: postgres
volumes:
- postgres-data:/var/lib/postgresql/data
- ./docker/init-db:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U intelligence -d postgres"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
networks:
- intelligence
redis:
image: redis:7-alpine
ports:
- "${REDIS_HOST_PORT:-6379}:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
networks:
- intelligence
# ---------------------------------------------------------------------------
# Database migrations (runs once then exits)
# ---------------------------------------------------------------------------
db-migrations:
image: ghcr.io/copilotkit/intelligence/db-migrations:0.1.0-rc.7
environment:
DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app
depends_on:
postgres:
condition: service_healthy
restart: "no"
networks:
- intelligence
# ---------------------------------------------------------------------------
# Intelligence services
# ---------------------------------------------------------------------------
app-api:
image: ghcr.io/copilotkit/intelligence/app-api:0.1.0-rc.7
ports:
- "${APP_API_HOST_PORT:-4201}:4201"
environment:
NODE_ENV: development
HOST: 0.0.0.0
PORT: 4201
LOG_LEVEL: debug
DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app
REDIS_URL: redis://redis:6379
AUTH_SECRET: local-dev-secret-must-be-at-least-32-chars
AUTH_TRUST_HOST: "true"
DEPLOYMENT_MODE: self-hosted
DEFAULT_ORGANIZATION_ID: casa-de-erlang
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
db-migrations:
condition: service_completed_successfully
restart: unless-stopped
networks:
- intelligence
realtime-gateway:
image: ghcr.io/copilotkit/intelligence/realtime-gateway:0.1.0-rc.7
ports:
- "${REALTIME_GATEWAY_HOST_PORT:-4401}:4401"
environment:
DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app
REDIS_URL: redis://redis:6379
RUNNER_AUTH_SECRET: dev-runner-secret
SECRET_KEY_BASE: local-realtime-gateway-secret-key-base-at-least-64-bytes-long-for-dev
PHX_HOST: localhost
PORT: 4401
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
db-migrations:
condition: service_completed_successfully
healthcheck:
test: ["CMD-SHELL", "nc -z 127.0.0.1 4401"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
restart: unless-stopped
networks:
- intelligence
thread-culler:
image: ghcr.io/copilotkit/intelligence/thread-culler:0.1.0-rc.7
command:
[
"sh",
"-lc",
"while true; do node dist/apps/thread-culler/main.mjs; sleep 3600; done",
]
environment:
DATABASE_URL: postgresql://intelligence:intelligence@postgres:5432/intelligence_app
COPILOTKIT_LICENSE_TOKEN: "${COPILOTKIT_LICENSE_TOKEN:-}"
THREAD_STALE_HOURS: "${THREAD_STALE_HOURS:-3}"
THREAD_CULL_BATCH_SIZE: "${THREAD_CULL_BATCH_SIZE:-1000}"
depends_on:
postgres:
condition: service_healthy
db-migrations:
condition: service_completed_successfully
restart: unless-stopped
networks:
- intelligence
volumes:
postgres-data:
redis-data:
networks:
intelligence:
driver: bridge