Files
Mutual_Fund/docker-compose.yml
2026-09-08 19:17:35 +08:00

60 lines
1.5 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 四个数据库一键启动:MySQL · Redis · Neo4j · Milvus(standalone 内置 etcd/minio)
# 启动:docker compose up -d 停止:docker compose down
services:
mysql:
image: mysql:8.0
container_name: fund-mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root123456}
MYSQL_DATABASE: ${MYSQL_DATABASE:-memory_demo}
TZ: Asia/Shanghai
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7
container_name: fund-redis
ports:
- "6379:6379"
volumes:
- redis-data:/data
neo4j:
image: neo4j:5
container_name: fund-neo4j
ports:
- "7474:7474" # 浏览器控制台
- "7687:7687" # bolt 驱动
environment:
NEO4J_AUTH: ${NEO4J_AUTH:-neo4j/neo4j1234}
volumes:
- neo4j-data:/data
milvus:
image: milvusdb/milvus:v2.4-latest
container_name: fund-milvus
ports:
- "19530:19530" # gRPC/HTTP 接口
- "9091:9091" # 监控端口
volumes:
- milvus-data:/var/lib/milvus
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
volumes:
mysql-data:
redis-data:
neo4j-data:
milvus-data: