Exercise Nginx routing, Mongo transaction ordering, history backfills, Undo, Pub/Sub TCP loss, safety polling, resync, and reconnection. Keep fixtures and results isolated from production and git.
62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
x-app: &app
|
|
image: ${COMPOSE_PROJECT_NAME}-app
|
|
build:
|
|
context: ../../../..
|
|
dockerfile: apps/api/test/auction-cluster/Dockerfile
|
|
environment: &environment
|
|
MONGO_TEST_URL: mongodb://mongo:27017/auction_cluster?replicaSet=auction_cluster
|
|
REDIS_TEST_URL: redis://redis-proxy:6379
|
|
NODE_ENV: test
|
|
NEW_RELIC_ENABLED: 'false'
|
|
volumes:
|
|
- ./results:/results
|
|
networks: [cluster]
|
|
mem_limit: 1g
|
|
|
|
services:
|
|
redis:
|
|
image: redis:8-alpine
|
|
command: [redis-server, --save, '', --appendonly, 'no']
|
|
networks: [cluster]
|
|
mem_limit: 256m
|
|
mongo:
|
|
# MongoDB 8+ refuses the test host's Linux 7.0.0 kernel (SERVER-121912).
|
|
image: ${MONGO_TEST_IMAGE:-mongo:7.0}
|
|
command:
|
|
[
|
|
mongod,
|
|
--replSet,
|
|
auction_cluster,
|
|
--bind_ip_all,
|
|
--wiredTigerCacheSizeGB,
|
|
'0.25',
|
|
]
|
|
networks: [cluster]
|
|
mem_limit: 768m
|
|
redis-proxy:
|
|
<<: *app
|
|
command: [node, test/auction-cluster/fault-proxy.mjs]
|
|
mem_limit: 128m
|
|
api-a:
|
|
<<: *app
|
|
environment:
|
|
<<: *environment
|
|
CLUSTER_NODE: api-a
|
|
api-b:
|
|
<<: *app
|
|
environment:
|
|
<<: *environment
|
|
CLUSTER_NODE: api-b
|
|
lb:
|
|
image: nginx:stable-alpine
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
networks: [cluster]
|
|
mem_limit: 128m
|
|
runner:
|
|
<<: *app
|
|
command: [node, test/auction-cluster/run.mjs, verify]
|
|
|
|
networks:
|
|
cluster: {}
|