-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
79 lines (73 loc) · 1.5 KB
/
docker-compose.yml
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
version: "3.8"
services:
ollama:
build:
context: .
dockerfile: Dockerfile.ollama
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app_network
redis:
image: redis:alpine
ports:
- "6379:6379"
networks:
- app_network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
llm_service:
build:
context: ./llm_api
dockerfile: Dockerfile
ports:
- "5000:5000"
depends_on:
ollama:
condition: service_healthy
environment:
- OLLAMA_HOST=http://ollama:11434
volumes:
- ./llm_api:/app
networks:
- app_network
golang_app:
build:
context: ./app
dockerfile: Dockerfile
ports:
- "8080:8080"
depends_on:
llm_service:
condition: service_started
redis:
condition: service_healthy
environment:
- SERVER_ADDR=:8080
- LLM_BASE_URL=http://llm_service:5000
- REDIS_ADDR=redis:6379
- DATABASE_PATH=/app/data/nous.db
- STATIC_PATH=/app/static
- TEMPLATES_PATH=/app/templates
volumes:
- golang_app_data:/app/data
- ./app/static:/app/static
- ./app/templates:/app/templates
networks:
- app_network
networks:
app_network:
driver: bridge
volumes:
ollama_data:
golang_app_data: