-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.32 KB
/
docker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.32 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
services:
backend:
build:
context: ./backend
target: dev
container_name: cortex-backend
ports:
- "8000:8000"
env_file:
- .env
environment:
# Override DB_HOST to point at the compose postgres service
DB_HOST: postgres
DB_PORT: "5432"
DB_NAME: ${DB_NAME:-cortex}
DB_USER: ${DB_USER:-postgres}
DB_PASSWORD: ${DB_PASSWORD:-postgres}
# Note: DB_PASSWORD must not contain URL-special characters (@, :, /, %)
VECTOR_DB_URL: postgresql://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@postgres:5432/${DB_NAME:-cortex}
volumes:
- ./backend:/app
- cognee-data:/app/.cognee_system
depends_on:
postgres:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
postgres:
image: pgvector/pgvector:pg16
container_name: cortex-postgres
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_DB: ${DB_NAME:-cortex}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5
volumes:
pgdata:
cognee-data:
networks:
default:
name: cortex-network
external: true