Services are accessible from your application through their relationships. An app gains access to a service if a relationship is created for it, and communication is done through that service's protocol.
For example, an app with a relationship to a MySQL service will be able to connect to the MySQL database service on port 3306 using the service's internal hostname. These service details can be read by querying the base64-encoded PLATFORM_RELATIONSHIPS environment variable, or by using a config reader helper module for the language your app is written in.
Here's an example command of how to read your relationships variable:
echo $PLATFORM_RELATIONSHIPS | base64 -d | json_pp
For more information on this feature, please see the following page in the Upsun documentation:
Comments
Article is closed for comments.