This commit is contained in:
BBIT-Kai
2025-10-22 13:54:10 +08:00
parent e81b2e9c20
commit 64262c4432
9 changed files with 144 additions and 164 deletions
+25 -16
View File
@@ -7,6 +7,7 @@ x-kong-config:
KONG_PG_USER: postgres
KONG_PG_PASSWORD: 123456
services:
# ---------- PostgreSQL ----------
postgres:
container_name: ce_postgres
@@ -15,6 +16,7 @@ services:
POSTGRES_DB: ktor # 实际上这里已经没用了,因为卷已经创建了,现在在用ktor2、kong两个数据库
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "5432:5432"
volumes:
@@ -27,6 +29,11 @@ services:
redis:
container_name: ce_redis
image: redis:7.2.3-alpine
command: [
"redis-server",
"--save", "60", "100",
"--appendonly", "yes",
]
volumes:
- redis_data:/data
ports:
@@ -50,13 +57,13 @@ services:
- minio_data:/data
networks:
- ce_network
restart: unless-stopped
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
interval: 30s
timeout: 20s
retries: 3
restart: unless-stopped
# ---------- ETCD ----------
etcd:
@@ -69,15 +76,15 @@ services:
- ETCD_SNAPSHOT_COUNT=50000
networks:
- ce_network
restart: unless-stopped
volumes:
- etcd_data:/data/etcd
command: etcd -advertise-client-urls=http://etcd:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /data/etcd
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health"]
interval: 10s
timeout: 5s
retries: 5
interval: 30s
timeout: 20s
retries: 3
restart: unless-stopped
# ---------- Milvus ----------
milvus:
@@ -86,7 +93,6 @@ services:
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined
restart: unless-stopped
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
@@ -107,6 +113,7 @@ services:
depends_on:
- etcd
- minio
restart: unless-stopped
# ---------- Attu ----------
attu:
@@ -118,9 +125,9 @@ services:
- ce_network
ports:
- "3000:3000" # 浏览器访问端口
restart: unless-stopped
depends_on:
- milvus
restart: unless-stopped
# ---------- Kong 网关 ----------
kong-migrations:
@@ -184,7 +191,6 @@ services:
rabbitmq:
image: rabbitmq:4.2-rc-management-alpine
container_name: ce_rabbitmq
restart: always
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: 123456
@@ -198,12 +204,12 @@ services:
- rabbitmq_data:/var/lib/rabbitmq
networks:
- ce_network
restart: unless-stopped
# ---------- prometheus ----------
prometheus:
image: prom/prometheus:v3.7.0-rc.0
container_name: ce_prometheus
restart: always
volumes:
- ./config/prometheus:/etc/prometheus
- prometheus_data:/prometheus
@@ -219,12 +225,12 @@ services:
- postgres-exporter
- rabbitmq
- redis-exporter
restart: unless-stopped
# ---------- grafana ----------
grafana:
image: grafana/grafana:12.3.0-18481575143-ubuntu
container_name: ce_grafana
restart: always
ports:
- "0.0.0.0:3001:3000"
environment:
@@ -237,6 +243,8 @@ services:
- prometheus
networks:
- ce_network
restart: unless-stopped
# ---------- Redis Exporter ----------
redis-exporter:
image: oliver006/redis_exporter:v1.78.0-alpine
@@ -247,9 +255,9 @@ services:
# - "9121:9121" # 无需暴露内网端口 直接通过ce_redis_exporter访问即可
networks:
- ce_network
restart: unless-stopped
depends_on:
- redis
restart: unless-stopped
# ---------- PostgreSQL Exporter ----------
postgres-exporter:
@@ -261,9 +269,9 @@ services:
# - "9187:9187" # 无需暴露内网端口 直接通过ce_postgres_exporter访问即可
networks:
- ce_network
restart: unless-stopped
depends_on:
- postgres
restart: unless-stopped
# ---------- node_exporter ----------
node_exporter:
@@ -273,9 +281,9 @@ services:
- '--path.rootfs=/host'
network_mode: host
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
restart: unless-stopped
# ---------- 数据卷 ----------
volumes:
@@ -296,6 +304,7 @@ volumes:
rabbitmq_data:
prometheus_config:
prometheus_data:
# ---------- 网络 ----------
networks:
ce_network: