Environment variables are a great way to configure your service and keep secrets out of your code. Sliplane supports environment variables out of the box, and you can configure them in the dashboard or while creating a new service.
All environment variables are available to your service as process environment variables (during build and runtime!), and if no .env file exists in the root of the project, Sliplane will create one for you with the environment variables you have configured.
Setting environment variables
You can either set environment variables as key-value pairs, or paste the content of your .env file. The .env file should have the same format as described in the .env file section.
All environment variables are encrypted during transit.
The env file is a simple text file with key-value pairs, one per line. The file is located in the root of your project, and is named .env. The file is automatically created for you if it doesn't exist (it should'nt). It has the following format:
Certain keys are used internally by the Sliplane client and can not be overwritten by you. The keys and explanation can be found in the following list:
PORT: The PORT variable is used by the Sliplane to tell your service on which port to listen. It should be in the range of 8080 to 65535. If your service is exposed to the internet via HTTP and fails to listen to the specified port the deployment and healthchecks will fail.
If you have any questions or feedback, please contact us.