mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-08-15 00:10:44 +02:00
Add a reliable MongoDB replica setup runbook (#766)
* docs: clarify MongoDB Tailscale bind addresses * fix: make MongoDB replica host mapping deterministic * docs: add complete MongoDB replica runbook * docs: support different replica server paths
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
services:
|
||||
mongodb:
|
||||
hostname: ${MONGO_PRIMARY_HOSTNAME:-mongo-primary}
|
||||
entrypoint:
|
||||
- /bin/bash
|
||||
- /opt/anonymous-github/mongodb-replica-entrypoint.sh
|
||||
@@ -12,6 +13,12 @@ services:
|
||||
- --bind_ip_all
|
||||
environment:
|
||||
MONGO_REPLICA_KEYFILE_PATH: /run/secrets/mongo-replica-keyfile
|
||||
extra_hosts:
|
||||
- "${MONGO_SECONDARY_HOSTNAME:-mongo-secondary}:${MONGO_SECONDARY_ADDRESS:?Set MONGO_SECONDARY_ADDRESS to the secondary server Tailscale IP}"
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- ${MONGO_PRIMARY_HOSTNAME:-mongo-primary}
|
||||
volumes:
|
||||
- ${MONGO_REPLICA_KEYFILE:-./secrets/mongo-replica-keyfile}:/run/secrets/mongo-replica-keyfile:ro
|
||||
- ./scripts/mongodb-replica-entrypoint.sh:/opt/anonymous-github/mongodb-replica-entrypoint.sh:ro
|
||||
|
||||
Reference in New Issue
Block a user