Deploying
Variables and secrets
Give your app its settings as environment variables, without putting them in your code.
Add a variable
- Open the app and choose the Environment tab.
- Enter a name and a value. Switch on Secret for passwords, keys and tokens.
- Choose Save variable, then redeploy the app: variables apply from the next deploy.
You can also paste a whole .env file under Import: one NAME=value per line;
export, quotes and # comments are understood. Names that look secret (containing
PASSWORD, SECRET, TOKEN, KEY and so on) are stored as secrets.
Secrets
Every value is stored encrypted. A secret's value is never shown again after you save it, not even to you: to change it, enter a new value. Your app receives secrets like any other variable.
Rules
- Names use letters, digits and
_, and don't start with a digit (for exampleMAIL_HOST). - Up to 100 variables per app; a value can be up to 32,768 characters.
- Some names are set by OceanLaunch itself and can't be used:
PORT,SERVER_PORT,HOST,HOSTNAME,JAVA_TOOL_OPTIONS,SOURCE_COMMIT,ARTIFACT_URL,ARTIFACT_SHA256, and names starting withCOOLIFY_,SERVICE_FQDN_,SERVICE_URL_orSAASONE_. Set your app's port in its settings instead (see Logs, restarts and health).
Spring Boot
Spring Boot reads environment variables as settings: SPRING_MAIL_HOST sets
spring.mail.host, MYAPP_FEATURE_ENABLED sets myapp.feature.enabled.
Connecting a database adds the SPRING_DATASOURCE_* variables for you.