Environment variables represent a kind of placeholders, where you can store the frequently used parameters’ values or strings in order not to specify them manually in the code each time they are needed. There is a number of default environment variables which are preconfigured at Jelastic application servers and can be easily integrated into your app, hosted within these servers, to make your work with Jelastic Cloud even more convenient.
In order to set your own custom environment variables, you’ll need to establish the SSH connection to the desired server and declare them in the corresponding configuration file via your SSH console. The following guide will provide you with the details on how this can be done on the example of the Apache Ruby application server. Nevertheless, this instruction is also fully suitable for the rest of the application servers, regardless whether they are intended to serve Java, PHP, Ruby, Python or Node.js applications. Furthermore, it is also applicable for other container types, so you can also declare your custom variables for a DB server, NGINX-balancer, Memcached node etc if needed.
|We have a separate instruction on setting custom environment variables and JVM options through the Jelastic dashboard for Java application servers. For the rest of the nodes (except .NET and Dockers) you will have to follow the workflow below.|