The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/ee/server/services
Diego Sampaio 48af214014
Regression: Fix broadcast events when running as monolith (#19498)
5 years ago
..
.config [NEW][Enterprise] Micro services (#19000) 5 years ago
account Micro Services: Fix logout issue (#19423) 5 years ago
authorization [NEW][Enterprise] Micro services (#19000) 5 years ago
ddp-streamer Unify ephemeral message events (#19464) 5 years ago
presence Regression: Fix broadcast events when running as monolith (#19498) 5 years ago
stream-hub Regression: Fix broadcast events when running as monolith (#19498) 5 years ago
.env [NEW][Enterprise] Micro services (#19000) 5 years ago
.gitignore [NEW][Enterprise] Micro services (#19000) 5 years ago
Dockerfile [NEW][Enterprise] Micro services (#19000) 5 years ago
README.md [NEW][Enterprise] Micro services (#19000) 5 years ago
docker-compose.yml [NEW][Enterprise] Micro services (#19000) 5 years ago
ecosystem.config.js Micro Services: Fix logout issue (#19423) 5 years ago
mongo.ts [NEW][Enterprise] Micro services (#19000) 5 years ago
package-lock.json [NEW][Enterprise] Micro services (#19000) 5 years ago
package.json [NEW][Enterprise] Micro services (#19000) 5 years ago
tsconfig.json [NEW][Enterprise] Micro services (#19000) 5 years ago

README.md

Rocket.Chat Micro-Services

PM2

This usually suits better for development purposes.

Start NATS first, you can it via Docker:

docker run --rm -d -p 4222:4222 nats

Then run Rocket.Chat as usual with an additional TRANSPORTER and DISABLE_DB_WATCH env vars:

TRANSPORTER=nats://localhost:4222 MOLECULER_LOG_LEVEL=debug DISABLE_DB_WATCH=true meteor

Set up an Enterprise license going to Admin > Enterprise.

Then you can spin up micro services. From this folder, first install dependencies:

meteor npm i

You can run on dev to have hot reloading:

MONGO_URL=mongodb://localhost:3001/meteor \
MOLECULER_LOG_LEVEL=debug \
TRANSPORTER=nats://localhost:4222 \
meteor npm run dev

To see process logs, do:

meteor npm run pm2 -- logs

Docker Compose

The .env file defines the HTTP address to be used, default to localhost.

It requires meteor to be running, and the config at services/.config/services/service.env uses the default meteor mongodb. To run it:

TRANSPORTER=nats://localhost:4222 MOLECULER_LOG_LEVEL=debug meteor

The docker-compose.yml file contais a setup of the micro-services plus some extra tools:

Traefik

It's used to route the the domain on port 80 to the DDP Streamer Service and expose these addresses

  • traefik.localhost as Traefik admin
  • prometheus.localhost as Prometheus admin
  • grafana.localhost as Grafana dashboards

Prometheus

Used to collect metrics from the micro-services

Grafana

Used to expose metrics from prometheus as dashboards

Nats

Used for the communication of the microservices

Build containers

npm run build-containers will build the typescript files and generate the containers

Running with docker-compose

docker-compose up --remove-orphans will run all the micro-services, still need to run MongoDB and Rocket.Chat Core separated

Running rocket.chat core

MONGO_URL=mongodb://localhost:27017/rocketchat MONGO_OPLOG_URL=mongodb://localhost:27017/local TRANSPORTER=nats://localhost:4222 MOLECULER_LOG_LEVEL=debug meteor