-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
134 lines (128 loc) · 3.91 KB
/
docker-compose.yml
File metadata and controls
134 lines (128 loc) · 3.91 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
services:
app:
build: .
image: knowledgeops-agent:latest
container_name: knowledgeops-agent
restart: unless-stopped
ports:
- "8080:8080"
environment:
SPRING_PROFILES_ACTIVE: prod
DB_URL: jdbc:mysql://mysql:3306/knowledgeops_agent?useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
DB_USERNAME: root
# IMPORTANT: Replace these defaults with real secrets in production.
# Use a .env file or CI secrets to set DB_PASSWORD, OPENAI_API_KEY, APP_JWT_SECRET.
DB_PASSWORD: ${DB_PASSWORD:-root}
OPENAI_API_KEY: ${OPENAI_API_KEY:-sk-replace-me}
OPENAI_BASE_URL: ${OPENAI_BASE_URL:-https://dashscope.aliyuncs.com/compatible-mode}
APP_SECURITY_ENABLED: "true"
APP_JWT_SECRET: ${APP_JWT_SECRET:-replace-me-with-real-secret}
APP_CORS_ALLOWED_ORIGINS: ${APP_CORS_ALLOWED_ORIGINS:-http://localhost:8088}
APP_VECTOR_STORE_BACKEND: simple
APP_REQUIRE_PGVECTOR: "false"
APP_INGESTION_QUEUE_BACKEND: redis_stream
OTEL_SAMPLING_PROBABILITY: ${OTEL_SAMPLING_PROBABILITY:-0.1}
REDIS_HOST: redis
RABBITMQ_HOST: rabbitmq
RABBITMQ_PORT: 5672
RABBITMQ_USERNAME: guest
RABBITMQ_PASSWORD: guest
OTEL_EXPORTER_OTLP_ENDPOINT: http://tempo:4318/v1/traces
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1:8080/actuator/health"]
interval: 20s
timeout: 5s
retries: 5
start_period: 60s
deploy:
resources:
limits:
cpus: "2.0"
memory: 1536M
reservations:
cpus: "0.5"
memory: 512M
mysql:
image: mysql:8.0.36
container_name: knowledgeops-agent-mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root}
MYSQL_DATABASE: knowledgeops_agent
ports:
- "3306:3306"
command: ["mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci", "--max-connections=200", "--innodb-buffer-pool-size=256M"]
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -p${DB_PASSWORD:-root}"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:7.4-alpine
container_name: knowledgeops-agent-redis
restart: unless-stopped
ports:
- "6379:6379"
command: ["redis-server", "--appendonly", "yes", "--maxmemory", "256mb", "--maxmemory-policy", "allkeys-lru"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
rabbitmq:
image: rabbitmq:3.13-management
container_name: knowledgeops-agent-rabbitmq
restart: unless-stopped
ports:
- "5672:5672"
- "15672:15672"
volumes:
- rabbitmq-data:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 10
tempo:
image: grafana/tempo:2.6.1
container_name: knowledgeops-agent-tempo-lite
restart: unless-stopped
command: ["-config.file=/etc/tempo/tempo.yml"]
volumes:
- ./observability/tempo/tempo.yml:/etc/tempo/tempo.yml:ro
- tempo-data:/tmp/tempo
ports:
- "4319:4318"
web:
build:
context: .
dockerfile: frontend/Dockerfile
image: knowledgeops-agent-web:latest
container_name: knowledgeops-agent-web
restart: unless-stopped
depends_on:
app:
condition: service_healthy
ports:
- "8088:80"
healthcheck:
test: ["CMD", "wget", "-q", "-O", "-", "http://127.0.0.1/"]
interval: 20s
timeout: 5s
retries: 5
volumes:
mysql-data:
redis-data:
rabbitmq-data:
tempo-data: