/claim #7941
RocketChat deployments were failing with “container mongodb is unhealthy” error. The MongoDB container was unable to initialize its replica set because the container hostname didn’t match the expected hostname in the replica set configuration.
The Bitnami MongoDB image expects the container hostname to match the MONGODB_ADVERTISED_HOSTNAME and MONGODB_INITIAL_PRIMARY_HOST environment variables (both set to “mongodb”). However, Docker Compose was creating containers with random hostnames (container IDs), causing replica set initialization to fail with “No host described in new configuration maps to this node”.
Added hostname: mongodb to the MongoDB service in the RocketChat Docker Compose template. This ensures the container hostname matches the replica set configuration, allowing MongoDB to initialize successfully and become healthy.
sidd190
@sidd190
Paul Albrecht
@paul-hph