1
0
Fork 0
mirror of https://github.com/anyproto/any-sync-dockercompose.git synced 2025-06-08 14:07:02 +09:00

docker-compose.yml fixed mongo rs init command

This commit is contained in:
Grigory Efimov 2024-04-05 16:27:07 -03:00
parent 7f4550450e
commit 78ac4eda72
No known key found for this signature in database
GPG key ID: 0A88C34DFA7FD939

View file

@ -3,13 +3,15 @@ version: "3.9"
services: services:
mongo-1: mongo-1:
image: "mongo:${MONGO_VERSION}" image: "mongo:${MONGO_VERSION}"
environment:
MONGO_INITDB_REPLICA_SET_NAME: ${MONGO_REPLICA_SET}
command: --replSet ${MONGO_REPLICA_SET} --port ${MONGO_1_PORT} command: --replSet ${MONGO_REPLICA_SET} --port ${MONGO_1_PORT}
ports: ports:
- "${MONGO_1_PORT}:${MONGO_1_PORT}" - "${MONGO_1_PORT}:${MONGO_1_PORT}"
volumes: volumes:
- ./storage/mongo-1/:/data/db - ./storage/mongo-1/:/data/db
healthcheck:
test: echo "try { rs.status() } catch (err) { rs.initiate() }" | mongosh --port ${MONGO_1_PORT} --quiet
interval: 10s
start_period: 30s
redis: redis:
image: "redis/redis-stack-server:${REDIS_VERSION}" image: "redis/redis-stack-server:${REDIS_VERSION}"