droboticflow/scripts/local/query-replica.compose.yml

32 lines
1.1 KiB
YAML

name: fanyu-query-replica-local
services:
valkey:
image: valkey/valkey@sha256:e51a82741b780e4bf315db10753edf07eea6496d405fa7df2a8677a18f5e7464
command:
["valkey-server", "--maxmemory", "128mb", "--maxmemory-policy", "allkeys-lru", "--save", "", "--appendonly", "no"]
ports: ["127.0.0.1:27139:6379"]
cpus: 1
mem_limit: 256m
source:
image: mongo@sha256:5d7043a4ffe02b9ed1b6e0bab057546981af5ca0a79107e9c461e49bc44c0a7b
command: ["mongod", "--port", "27119", "--bind_ip_all", "--wiredTigerCacheSizeGB", "1"]
ports: ["127.0.0.1:27119:27119"]
cpus: 4
mem_limit: 4g
volumes: ["source-data:/data/db"]
ulimits:
nofile: { soft: 65536, hard: 65536 }
query:
image: mongo@sha256:5d7043a4ffe02b9ed1b6e0bab057546981af5ca0a79107e9c461e49bc44c0a7b
command:
["mongod", "--port", "27129", "--replSet", "query-read-rs", "--bind_ip_all", "--wiredTigerCacheSizeGB", "2"]
ports: ["127.0.0.1:27129:27129"]
cpus: 4
mem_limit: 8g
volumes: ["query-data:/data/db"]
ulimits:
nofile: { soft: 65536, hard: 65536 }
volumes:
source-data:
query-data: