MongoDB Compass is the official GUI to manage MongoDB database. It supports CRUD operations and offers nice visualization of your data. It is freely available on the MongoDB website.
Databases hosted on Scalingo are not by default directly available on the Internet. There are a couple of ways to get access to a Scalingo hosted database: building an SSH tunnel and making the database available on the internet. More information in the dedicated page.
Configuration of Compass
Connection via an Encrypted Tunnel
The connection data can be found in the
MONGO_URL environment variable of your application.
$ scalingo --app my-app env | grep MONGO_URL MONGO_URL=mongodb://sample-node-meanjs-7093:EsEjseivpacatVoogfijbiapgadTyg@c393a9e3-42fe-4e33-9e6c-8ee815e9af88.sample-node-meanjs-7093.mongodb.dbs.scalingo.com:31312/sample-node-meanjs-7093
In this case:
- Hostname: c393a9e3-42fe-4e33-9e6c-8ee815e9af88.sample-node-meanjs-7093.mongodb.dbs.scalingo.com
- Port: 31312
- User: sample-node-meanjs-7093
- Password: EsEjseivpacatVoogfijbiapgadTyg
- Database: sample-node-meanjs-7093
Fill the fields accordingly:
The “SSH Tunnel” section must “Use Identity File”. The identity file to provide is your private SSH key you uploaded on your Scalingo profile.
The “SSH Hostname” and “SSH Port” depends on the region your database is deployed on:
- 3DS Outscale Paris:
- SSH Hostname: ssh.osc-fr1.scalingo.com
- SSH Port: 22
- 3DS Outscale Paris SecNumCloud:
- SSH Hostname: ssh.osc-secnum-fr1.scalingo.com
- SSH Port: 22
Connection with TLS
As a replacement to using an encrypted tunnel to connect to your database, you can make it available on the internet from your database dashboard. You must first force TLS connections.
This is done in Compass by selecting “Server Validation” in the “SSL” section of the “Connect to Host” form:
The “Certificate Authority” is downloadable here.