docker-compose.yaml•627 B
services:
test-e2e:
environment:
- DATABASE_URL=mongodb://mongo:27017/test_db?retryWrites=true&replicaSet=rs0&directConnection=true
depends_on:
mongo:
condition: service_healthy
mongo:
image: mongo:7.0
command: ['--replSet', 'rs0', '--bind_ip_all', '--port', '27017', '--setParameter', 'notablescan=1']
healthcheck:
test: 'mongosh --port 27017 --eval "try { rs.status() } catch (err) { rs.initiate({_id:\"rs0\",members:[{_id:0,host:\"localhost:27017\"}]}); throw err; }"'
interval: 5s
timeout: 30s
start_period: 0s
start_interval: 1s
retries: 30