-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (89 loc) · 2.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
92 lines (89 loc) · 2.62 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
services:
neo4j:
image: neo4j:5
container_name: neo4j-gds
ports:
- "7474:7474"
- "7687:7687"
environment:
NEO4J_AUTH: ${NEO4J_AUTH:-neo4j/${NEO4J_PASSWORD}}
NEO4J_PLUGINS: '["graph-data-science"]'
NEO4J_dbms_security_procedures_unrestricted: "gds.*"
NEO4J_dbms_security_procedures_allowlist: "gds.*"
NEO4J_server_memory_heap_initial__size: 512m
NEO4J_server_memory_heap_max__size: 512m
NEO4J_server_memory_pagecache_size: 512m
volumes:
- neo4j_data:/data
- neo4j_plugins:/plugins
healthcheck:
test: ["CMD", "cypher-shell", "-u", "neo4j", "-p", "${NEO4J_PASSWORD}", "RETURN 1"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: graphrag-redis
ports:
- "6379:6379"
command: redis-server --appendonly yes
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
graphrag-api:
build:
context: .
dockerfile: Dockerfile
container_name: graphrag-api
ports:
- "8000:8000"
environment:
# Neo4j Configuration
- NEO4J_URI=${NEO4J_URI:-bolt://neo4j:7687}
- NEO4J_USER=${NEO4J_USER:-neo4j}
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
# OpenAI Configuration
- OPENAI_API_KEY=${OPENAI_API_KEY}
# API Configuration
- API_HOST=0.0.0.0
- API_PORT=8000
# Security Configuration
- ENABLE_AUTH=${ENABLE_AUTH:-false}
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
- ENABLE_RATE_LIMITING=${ENABLE_RATE_LIMITING:-true}
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-http://localhost:5173,http://localhost:3000}
- MAX_REQUEST_SIZE=${MAX_REQUEST_SIZE:-10485760}
# Cache Configuration
- CACHE_ENABLED=${CACHE_ENABLED:-true}
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
- CACHE_DEFAULT_TTL=${CACHE_DEFAULT_TTL:-3600}
# Logging Configuration
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- JSON_LOGS=${JSON_LOGS:-true}
- ENABLE_FILE_LOGGING=${ENABLE_FILE_LOGGING:-false}
volumes:
- ./data:/app/data
- ./logs:/app/logs
# .env file is optional - if it exists, it will be used, but docker-compose env vars take precedence
# - ./.env:/app/.env:ro
depends_on:
neo4j:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
neo4j_data:
neo4j_plugins:
redis_data: