2024-06-03 21:12:47 +00:00
# documentation: https://github.com/RocketChat/Rocket.Chat
# slogan: Self-hosted, secure and highly customizable open-source communication platform for organizations with sophisticated security and privacy concerns.
2025-08-17 16:23:57 +00:00
# category: messaging
2024-06-03 21:12:47 +00:00
# tags: rocketchat,chat,communication,privacy,mongodb,open,source
# logo: svgs/rocketchat.svg
# port: 3000
services :
rocketchat :
2026-01-20 18:15:03 +00:00
image : 'registry.rocket.chat/rocketchat/rocket.chat:8.0.1'
2024-06-03 21:12:47 +00:00
environment :
2025-08-10 08:10:22 +00:00
- SERVICE_URL_ROCKETCHAT_3000
2026-01-20 18:15:03 +00:00
- 'MONGO_URL=mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/${MONGODB_DATABASE:-rocketchat}?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}'
- 'MONGO_OPLOG_URL=mongodb://${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/local?replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}'
2025-08-10 08:10:22 +00:00
- ROOT_URL=$SERVICE_URL_ROCKETCHAT
2024-06-03 21:12:47 +00:00
- DEPLOY_METHOD=docker
- REG_TOKEN=$REG_TOKEN
2026-01-20 18:15:03 +00:00
- 'MAIL_URL=${MAIL_URL:-test@example.com}'
2024-06-03 21:12:47 +00:00
depends_on :
mongodb :
condition : service_healthy
healthcheck :
test :
2026-01-20 18:15:03 +00:00
- CMD
- node
- '--eval'
- "const http = require('http'); const options = { host: '0.0.0.0', port: 3000, timeout: 2000, path: '/health' }; const healthCheck = http.request(options, (res) => { console.log('HEALTHCHECK STATUS:', res.statusCode); if (res.statusCode == 200) { process.exit(0); } else { process.exit(1); } }); healthCheck.on('error', function (err) { console.error('ERROR'); process.exit(1); }); healthCheck.end();"
2024-06-03 21:12:47 +00:00
interval : 2s
timeout : 10s
retries : 15
mongodb :
2026-01-20 18:15:03 +00:00
image : 'mongo:7'
2024-06-03 21:12:47 +00:00
volumes :
2026-01-20 18:15:03 +00:00
- 'mongodb_data:/data/db'
command : "sh -c \"\n mongod --replSet ${MONGODB_REPLICA_SET_NAME:-rs0} --bind_ip_all &\n sleep 5 &&\n mongosh --eval 'rs.initiate({_id:\\\"${MONGODB_REPLICA_SET_NAME:-rs0}\\\", members:[{_id:0, host:\\\"mongodb:27017\\\"}]})' ||\n true &&\n wait\n\"\n"
2024-06-03 21:12:47 +00:00
healthcheck :
2026-01-20 18:15:03 +00:00
test :
- CMD
- mongosh
- '--quiet'
- '--eval'
- "db.adminCommand('ping')"
2024-06-03 21:12:47 +00:00
interval : 2s
timeout : 10s
retries : 15