Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
107 lines (101 loc) · 2.83 KB
/
Copy pathdocker-compose.yml
File metadata and controls
107 lines (101 loc) · 2.83 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
version: '3.8'
services:
valkey:
image: valkey/valkey:8-alpine
container_name: betterdb-monitor-valkey
ports:
- "6380:6379"
command: >
valkey-server
--requirepass devpassword
--slowlog-log-slower-than 0
--commandlog-request-larger-than 100
--commandlog-reply-larger-than 100
--commandlog-slow-execution-max-len 128
--commandlog-large-request-max-len 128
--commandlog-large-reply-max-len 128
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
restart: unless-stopped
valkey-bundle:
image: valkey/valkey-bundle:9.1-alpine
container_name: betterdb-monitor-valkey-bundle
ports:
- "6384:6379"
command: >
valkey-server
--requirepass devpassword
--slowlog-log-slower-than 0
healthcheck:
test: ["CMD", "valkey-cli", "-a", "devpassword", "ping"]
interval: 10s
timeout: 3s
retries: 3
restart: unless-stopped
redis:
image: redis:8-alpine
container_name: betterdb-monitor-redis
ports:
- "6382:6379"
command: >
redis-server
--requirepass devpassword
--appendonly yes
--slowlog-log-slower-than 10000
--slowlog-max-len 128
--latency-monitor-threshold 100
--acllog-max-len 128
healthcheck:
test: ["CMD", "redis-cli", "-a", "devpassword", "ping"]
interval: 10s
timeout: 3s
retries: 3
restart: unless-stopped
postgres:
# No pinned container_name: the entitlement test harness manages this
# service via compose, and a global name blocked container creation in a
# second checkout (e.g. monitor + monitor-master) even when the first
# checkout's container was merely stopped. Compose names it
# <project>-postgres-1 per checkout instead. To RUN two checkouts'
# postgres concurrently, the host port must also differ — override it
# with POSTGRES_HOST_PORT (the entitlement test harness honors the same
# variable).
image: postgres:16-alpine
ports:
- "${POSTGRES_HOST_PORT:-5432}:5432"
environment:
POSTGRES_USER: betterdb
POSTGRES_PASSWORD: devpassword
POSTGRES_DB: betterdb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U betterdb"]
interval: 10s
timeout: 3s
retries: 3
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
ollama:
image: ollama/ollama:latest
container_name: betterdb-monitor-ollama
profiles: ["ai"]
ports:
- "11434:11434"
volumes:
- ollama_models:/root/.ollama
deploy:
resources:
reservations:
memory: 8G
restart: unless-stopped
healthcheck:
test: ["CMD", "ollama", "list"]
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
ollama_models: