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:
parent
7f4550450e
commit
78ac4eda72
1 changed files with 4 additions and 2 deletions
|
@ -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}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue