-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
104 lines (99 loc) · 2.6 KB
/
docker-compose.yaml
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
services:
app:
build: .
ports:
- "8501:8501"
depends_on:
- elasticsearch
- ollama
environment:
- ELASTICSEARCH_HOST=elasticsearch
- ELASTICSEARCH_PORT=9200
- YOUTUBE_API_KEY=${YOUTUBE_API_KEY}
- OLLAMA_HOST=http://ollama:11434
- OLLAMA_TIMEOUT=${OLLAMA_TIMEOUT:-120}
- OLLAMA_MAX_RETRIES=${OLLAMA_MAX_RETRIES:-3}
- PYTHONPATH=/app
- STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
- STREAMLIT_THEME_PRIMARY_COLOR="#FF4B4B"
env_file:
- .env
volumes:
- ./app:/app/app
- ./data:/app/data
- ./config:/app/config
- ./logs:/app/logs
- ./.streamlit:/root/.streamlit:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
interval: 30s
timeout: 10s
retries: 5
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.9.0
container_name: elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ports:
- "9200:9200"
- "9300:9300"
deploy:
resources:
limits:
memory: 2G
volumes:
- esdata:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 30s
timeout: 10s
retries: 5
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
- GF_AUTH_ANONYMOUS_ENABLED=false
- GF_SECURITY_ADMIN_USER=${GRAFANA_USERNAME:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
- GF_INSTALL_PLUGINS=frser-sqlite-datasource
- GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=frser-sqlite-datasource
- GF_LOG_LEVEL=debug
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/etc/grafana/dashboards
- grafana-storage:/var/lib/grafana
- ./data:/app/data:ro
- ./logs:/var/log/grafana
depends_on:
- elasticsearch
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://localhost:3000/api/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_data:/root/.ollama
deploy:
resources:
limits:
memory: 6G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/health"]
interval: 30s
timeout: 10s
retries: 5
volumes:
esdata:
driver: local
grafana-storage:
ollama_data:
networks:
default:
driver: bridge