OpenShift
Deploying Rocket.Chat on OpenShift
This guide covers how to host Rocket.Chat on OpenShift Online Next Gen.
OpenShift Online Next Gen is a completely rewritten PaaS solution based on Docker and Kubernetes that allows developers to quickly develop, host and scale applications in a cloud environment. OpenShift provides a CLI based tool that allows managing your projects and applications.
Please refer to Getting Started with the CLI documentation on OpenShift website.

Table of Contents

  1. 1.
    ​Login​
  2. 2.
    ​Create a project​
  3. 4.
    ​Create the app​

1. Login

First of all, we need to log in to OpenShift API URL to create our project. The command to log in to OpenShift Online Next Gen is shown below:
1
# oc login https://api.preview.openshift.com --token=<api_token>
Copied!
You can find the API Token to login to OpenShift Online Next Gen in the about page of the Web console.

2. Create a project

After login to OpenShift Online Next Gen, we need to create a project to host our Rocket.Chat application:
1
$ oc new-project rocket-chat
Copied!

3. Import the ImageStream and templates

Clone the Rocket.Chat GitHub repository and import the templates to your OpenShift project:
1
# git clone https://github.com/RocketChat/Rocket.Chat
2
# cd Rocket.Chat
3
# oc create -f .openshift/rocket-chat-ephemeral.json
4
# oc create -f .openshift/rocket-chat-persistent.json
Copied!

4. Create the app

Create the application using the newly created templated and pass the MONGODB_DATABASE,MONGODB_USER and MONGODB_PASSWORD parameters:
1
# oc new-app rocket-chat -p MONGODB_DATABASE=rocketchat -p MONGODB_USER=rocketchat-admin -p MONGODB_PASSWORD=rocketchat
Copied!
  • Rocket.Chat uses a domain check code to verify the validity of the e-mail address. To disable it, run the following commands:
1
# oc port-forward <mongodb_pod> 27017
2
# mongo localhost:27017
3
​
4
> use rocketchat
5
> db.auth('rocketchat-admin','rocketchat')
6
> db.rocketchat_settings.update({_id:'Accounts_UseDNSDomainCheck'},{$set:{value:false}})
Copied!
Last modified 2mo ago