-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (106 loc) · 2.75 KB
/
docker-compose.yml
File metadata and controls
111 lines (106 loc) · 2.75 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
services:
# Ollama - Embedding and local LLM server
ollama:
image: ollama/ollama:latest
container_name: grape-ollama
restart: unless-stopped
ports:
- "11434:11434"
volumes:
- ollama-data:/root/.ollama
networks:
- grape-network
# GraphDB - RDF Triplestore
graphdb:
image: ontotext/graphdb:10.7.3
container_name: grape-graphdb
ports:
- "7200:7200"
volumes:
- graphdb-data:/opt/graphdb/home
- graphdb-import:/root/graphdb-import
- ./kg_example:/kg_example:ro
environment:
GDB_JAVA_OPTS: "-Xmx2g -Xms1g"
networks:
- grape-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7200/rest/repositories"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
# Backend API
api:
build:
context: ./apps/backend
dockerfile: Dockerfile
container_name: grape-api
ports:
- "8000:8000"
environment:
- ENVIRONMENT=development
- LOG_LEVEL=INFO
- KG_SPARQL_ENDPOINT_URL=http://graphdb:7200/repositories/unified
- GRAPHDB_REPO_DEMO=http://graphdb:7200/repositories/demo
- GRAPHDB_REPO_HEARING=http://graphdb:7200/repositories/hearing
- GRAPHDB_REPO_PSYCHIATRY=http://graphdb:7200/repositories/psychiatry
- GRAPHDB_REPO_UNIFIED=http://graphdb:7200/repositories/unified
- OLLAMA_HOST=http://ollama:11434
# GCP Service Account for Vertex AI
- GOOGLE_APPLICATION_CREDENTIALS=/app/gcp-service-account.json
env_file:
- ./apps/backend/.env
volumes:
# Mount GCP Service Account key
- ./gcp-service-account.json:/app/gcp-service-account.json:ro
networks:
- grape-network
depends_on:
graphdb:
condition: service_healthy
ollama:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Frontend Web App
web:
build:
context: ./apps/web
dockerfile: Dockerfile
target: deps
container_name: grape-web
ports:
- "3000:3000"
volumes:
- ./apps/web:/app
- web-node-modules:/app/node_modules
- web-next:/app/.next
environment:
- NODE_ENV=development
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8000}
- HOSTNAME=0.0.0.0
command: npm run dev -- --hostname 0.0.0.0
networks:
- grape-network
depends_on:
- api
networks:
grape-network:
driver: bridge
volumes:
graphdb-data:
driver: local
graphdb-import:
driver: local
ollama-data:
driver: local
web-node-modules:
driver: local
web-next:
driver: local