-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (65 loc) · 1.93 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (65 loc) · 1.93 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
services:
db:
image: pgvector/pgvector:pg17
container_name: cocosearch-db
ports:
- "5432:5432"
environment:
POSTGRES_USER: cocosearch
POSTGRES_PASSWORD: cocosearch
POSTGRES_DB: cocosearch
volumes:
- ./docker_data/postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cocosearch -d cocosearch"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
app:
profiles: ["app"]
build: .
container_name: cocosearch-app
depends_on:
db:
condition: service_healthy
ollama:
condition: service_healthy
required: false
ports:
- "${COCOSEARCH_MCP_PORT:-3000}:${COCOSEARCH_MCP_PORT:-3000}"
environment:
COCOSEARCH_DATABASE_URL: postgresql://cocosearch:cocosearch@db:5432/cocosearch
COCOSEARCH_OLLAMA_URL: http://ollama:11434
# COCOSEARCH_EMBEDDING_PROVIDER: ollama # default; set to openai or openrouter for remote embeddings
# COCOSEARCH_EMBEDDING_API_KEY: ${COCOSEARCH_EMBEDDING_API_KEY:-}
COCOSEARCH_NO_DASHBOARD: "1"
COCOSEARCH_MCP_PORT: ${COCOSEARCH_MCP_PORT:-3000}
COCOSEARCH_PROJECTS_DIR: /projects
volumes:
- ${PROJECTS_DIR:-.}:/projects:ro
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:$${COCOSEARCH_MCP_PORT:-3000}/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
restart: unless-stopped
ollama:
profiles: ["ollama"]
image: ollama/ollama:latest
container_name: cocosearch-ollama
ports:
- "11434:11434"
volumes:
- ./docker_data/ollama:/root/.ollama
entrypoint: /bin/sh
command: -c "ollama serve & sleep 5 && ollama pull nomic-embed-text && wait"
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 10s
timeout: 10s
retries: 5
start_period: 60s
restart: unless-stopped