mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-08-15 00:10:44 +02:00
* 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
25 lines
874 B
YAML
25 lines
874 B
YAML
services:
|
|
mongodb:
|
|
hostname: ${MONGO_PRIMARY_HOSTNAME:-mongo-primary}
|
|
entrypoint:
|
|
- /bin/bash
|
|
- /opt/anonymous-github/mongodb-replica-entrypoint.sh
|
|
command:
|
|
- --quiet
|
|
- --replSet
|
|
- rs0
|
|
- --keyFile
|
|
- /tmp/mongo-replica-keyfile
|
|
- --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
|