" How to connect to PostgreSQL or MongoDB appliance from an Ephemeric Instance" by Mike on at tutorial/ephemeric_cloud_database_connect under #ephemericcloud  

How to connect to PostgreSQL or MongoDB appliance from an Ephemeric Instance

There is a way to connect your Ephemeric application to an external database using a secure channel (stunnel project). To enable the connection Image Archive File must have stunnel.conf and a keys file (usually psk.txt) in a directory with Pharo Image. The system will read the stunnel configuration for the file and create a SSL tunnel to a remote server. For an application the remote server will look like an unencrypted local resource so no configuration needed in the Image.

For instance the following Pharo code should work perfectly with stunnel to a remote MongoDB. You may notice that Pharo sees the database as a local one:

Mongo default open databases

Standalone databases hosted at Pharocloud by default work with secure channel. The example of stunnel.conf can be found at application configuration page on Pharocloud management site.

blog comments powered by Disqus