Fix RocketChat deployment failure due to MongoDB replica set initialization

/claim #7941

Problem

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.

Root Cause

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”.

Solution

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.

Changes

  • templates/compose/rocketchat.yaml - Added hostname specification
  • templates/service-templates.json - Updated base64 encoded template
  • templates/service-templates-latest.json - Updated base64 encoded template

Issues

  • fix #7941

Claim

Total prize pool $5
Total paid $0
Status Pending
Submitted January 13, 2026
Last updated January 13, 2026

Contributors

SI

sidd190

@sidd190

100%

Sponsors

PA

Paul Albrecht

@paul-hph

$5