2025-10-02 06:43:57 +00:00
|
|
|
services:
|
|
|
|
|
mongo:
|
|
|
|
|
image: mongo:8.0
|
|
|
|
|
container_name: mongo
|
|
|
|
|
restart: always
|
|
|
|
|
ports:
|
|
|
|
|
- "27017:27017"
|
|
|
|
|
environment:
|
|
|
|
|
MONGO_INITDB_ROOT_USERNAME: root
|
|
|
|
|
MONGO_INITDB_ROOT_PASSWORD: example
|
|
|
|
|
etcd:
|
|
|
|
|
image: quay.io/coreos/etcd:v3.5.5
|
|
|
|
|
container_name: etcd
|
|
|
|
|
restart: always
|
|
|
|
|
command: >
|
|
|
|
|
/usr/local/bin/etcd
|
|
|
|
|
--data-dir=/etcd-data
|
|
|
|
|
--name=etcd
|
|
|
|
|
--listen-client-urls=http://0.0.0.0:2379
|
|
|
|
|
--advertise-client-urls=http://etcd:2379
|
|
|
|
|
ports:
|
|
|
|
|
- "2379:2379"
|
|
|
|
|
- "2380:2380"
|
|
|
|
|
redis:
|
|
|
|
|
image: redis:7.0
|
|
|
|
|
container_name: redis
|
|
|
|
|
restart: always
|
|
|
|
|
ports:
|
2025-11-12 07:38:56 +00:00
|
|
|
- "6379:6379"
|
|
|
|
|
minio:
|
|
|
|
|
image: minio/minio
|
|
|
|
|
container_name: minio
|
|
|
|
|
ports:
|
|
|
|
|
- "9000:9000" # MinIO S3 API port
|
|
|
|
|
- "9001:9001" # MinIO Console port
|
|
|
|
|
environment:
|
|
|
|
|
MINIO_ROOT_USER: minioadmin # Replace with your desired root username
|
|
|
|
|
MINIO_ROOT_PASSWORD: minioadmin # Replace with your desired root password
|
|
|
|
|
# MINIO_DEFAULT_BUCKETS: mybucket # Optional: Create a default bucket on startup
|
|
|
|
|
command: server /data --console-address ":9001" # Start MinIO server and specify console address
|
2026-01-06 07:15:18 +00:00
|
|
|
centrifugo:
|
|
|
|
|
image: centrifugo/centrifugo:v5
|
|
|
|
|
container_name: centrifugo
|
|
|
|
|
restart: always
|
|
|
|
|
ports:
|
|
|
|
|
- "8000:8000" # HTTP API
|
|
|
|
|
- "8001:8001" # WebSocket
|
|
|
|
|
volumes:
|
|
|
|
|
- ./centrifugo.json:/centrifugo/config.json:ro
|
|
|
|
|
command: centrifugo --config=/centrifugo/config.json
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8000/health"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on:
|
|
|
|
|
- redis
|
|
|
|
|
cassandra:
|
|
|
|
|
image: cassandra:5.0.4
|
|
|
|
|
restart: always
|
|
|
|
|
ports:
|
|
|
|
|
- "9042:9042"
|
|
|
|
|
environment:
|
|
|
|
|
TZ: ${TIMEZONE:-UTC}
|
|
|
|
|
MAX_HEAP_SIZE: 4G
|
|
|
|
|
HEAP_NEWSIZE: 2G
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: [ "CMD", "cqlsh", "-k", "sccflex" ]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 12
|
|
|
|
|
mem_limit: 8g # <--- 單機 docker-compose up 時建議明確加這行
|
|
|
|
|
memswap_limit: 8g # <--- 關掉 swap
|