Environment Variable Reference

Commons to all Applications

Set by the deployment process

These are read-only variables that are generated for each scaler before they build and start your application.

Name
Description
Example value
INSTANCE_NUMBER Allows your application to differentiate each running node on the application level. 0, 1…
INSTANCE_TYPE Whether this instance is a "build" instance or a "production" instance. build, production
APP_ID The ID of your Clever Cloud application app_649a93d1-6677-44bc-aca7-6f46107d6e02
APP_HOME The absolute path to your application folder /home/bas/app_649a93d1-6677-44bc-aca7-6f46107d6e02
CC_DEPLOYMENT_ID Internal id of current deployment f7efaf04-1a63-45a1-8503-0de7c750ee48
COMMIT_ID The id of the commit that's currently running d88cd2ae1aaa91923ed2bd689d95d713b6f3f45f
CC_REVERSE_PROXY_IPS A comma separated list of trusted IP addresses. You should only accept requests coming from these IP addresses. x.y.z.z,x.y.z.z

Variables you can define

So you can alter the build&start process for your application.

Name
Description
Default value
APP_FOLDER Folder in which the application is located (inside the git repository)
CC_TROUBLESHOOT Enable debug log level, will also keep the VM up after failure for 15 minutes so you can SSH and debug. Don't forget to cancel deployment if you push a new commit. false
CC_WORKER_COMMAND Command to run in background as a worker process.
CC_WORKER_RESTART One of always, on-failure or no. Control whether a worker needs to be restarted when it exits on-failure
CC_PRE_BUILD_HOOK Ran before the dependencies are fetched. If it fails, the deployment fails.
CC_POST_BUILD_HOOK Ran after the project is built, and before the cache archive is generated. If it fails, the deployment fails.
CC_PRE_RUN_HOOK Ran before the application is started, but after the cache archive has been generated. If it fails, the deployment fails.
CC_RUN_SUCCEEDED_HOOK Ran once the application has started successfuly.
CC_RUN_FAILED_HOOK Ran once the application has failed to start.
CACHE_DEPENDENCIES Enable caching of your build dependencies to speed up following builds. false
ENABLE_METRICS BETA: Enable metrics collection, Contact support. false
IGNORE_FROM_BUILDCACHE Allows to specify paths to ignore when the build cache archive is created.

Docker

Docker Documentation

Name
Description
Default value
Read Only
CC_MOUNT_DOCKER_SOCKET Set to true to access the host Docker socket from inside your container. false

Go

Go Documentation

Name
Description
Default value
Read Only
CC_GO_PKG Makes the deployer run go get ${CC_GO_PKG} instead of go get <app_id>.

Haskell

Haskell Documentation

Name
Description
Default value
Read Only
CC_RUN_COMMAND Custom command to run your application.

Java

Java Documentation

Name
Description
Default value
Read Only
CC_SBT_TARGET_DIR
GRADLE_DEPLOY_GOAL Define which gradle goals to run during build.
JAVA_VERSION Choose the JVM version between 7 or 8. 8
MAVEN_DEPLOY_GOAL Define which maven goals to run during build.
NUDGE_APPID
PLAY1_VERSION Define which play1 version to use between 1.2, 1.3 and 1.4
SBT_DEPLOY_GOAL Define which sbt goals to run during build. stage

NodeJS

NodeJS Documentation

Name
Description
Default value
Read Only
CC_NODE_START_GOAL Defines which node scripts to run start
CC_RUN_COMMAND Define a custom command. Exemple for Meteor: node .build/bundle/main.js &lt;options&gt;
NODE_BUILD_TOOL Choose your build tool between npm and yarn npm
NPM_TOKEN Private repository token for npmjs.com

PHP

PHP Documentation

Name
Description
Default value
Read Only
ALWAYS_POPULATE_RAW_POST_DATA
CC_LDAP_CA_CERT
LDAPTLS_CACERT
ENABLE_REDIS false
HTTP_TIMEOUT Define a custom HTTP timeout 180
MAX_INPUT_VARS
PHP_VERSION Choose your PHP version between 5.6, 7 and 7.1 7
SESSION_TYPE Choose redis to use it as session store
SOCKSIFY_EVERYTHING
USE_SOCKS false

Python

Python Documentation

Name
Description
Default value
Read Only
CC_PYTHON_CELERY_LOGFILE Relative path to your Celery logfile: /path/to/logdir
CC_PYTHON_CELERY_MODULE Specify the Celery module you want to start: mymodule
CC_PYTHON_CELERY_USE_BEAT Set to true to activate Beat support
CC_PYTHON_MODULE Select which module you want to start: mymodule:app
CC_PYTHON_USE_GEVENT Set to true to enable Gevent
HARAKIRI Timeout (in seconds) after which an unresponding process is killed 180
PYTHON_BACKEND Choose the Python backend to use between uwsgi and gunicorn uwsgi
PYTHON_VERSION Choose the Python version between 2.7 and 3.6
PYTHON_SETUP_PY_GOAL Custom setup goal to be launch after requirements.txt have been installed
STATIC_FILES_PATH Relative path to where your static files are stored: path/to/static
STATIC_URL_PREFIX The URL path under which you want to serve static file, usually /public
STATIC_WEBROOT
UWSGI_INTERCEPT_ERRORS
UWSGI_ASYNC Number of cores to use for uWSGI asynchronous/non-blocking modes
UWSGI_ASYNC_ENGINE Select the asynchronous engine for uWSGI (optional)
WSGI_WORKERS Number of workers. (Defaut: automatically setup with the scaler size)
WSGI_THREADS Number of threads per worker. (Defaut: automatically setup with the scaler size)
WSGI_BUFFER_SIZE Buffer size (in bytes) for uploads. 4096
WSGI_POST_BUFFERING Maximal size (in bytes) for the headers of a request. 4096
ENABLE_GZIP_COMPRESSION Set to true to gzip-compress the output of uwsgi
NGINX_READ_TIMEOUT Read timeout in seconds 300

Ruby

Ruby Documentation

Name
Description
Default value
Read Only
CC_RACKUP_SERVER The server to use for serving the ruby application puma
HARAKIRI Timeout (in seconds) after which an unresponding process is killed 180
RACK_ENV
RAILS_ENV
RUBY_VERSION Choose the Ruby version to use.
STATIC_FILES_PATH Relative path to where your static files are stored: path/to/static
STATIC_URL_PREFIX The URL path under which you want to serve static file, usually /public
STATIC_WEBROOT
UWSGI_INTERCEPT_ERRORS
UWSGI_ASYNC Number of cores to use for uWSGI asynchronous/non-blocking modes
UWSGI_ASYNC_ENGINE Select the asynchronous engine for uWSGI (optional)
WSGI_WORKERS Number of workers. (Defaut: automatically setup with the scaler size)
WSGI_THREADS Number of threads per worker. (Defaut: automatically setup with the scaler size)
WSGI_BUFFER_SIZE Buffer size (in bytes) for uploads. 4096
WSGI_POST_BUFFERING Maximal size (in bytes) for the headers of a request. 4096
ENABLE_GZIP_COMPRESSION Set to true to gzip-compress the output of uwsgi
NGINX_READ_TIMEOUT Read timeout in seconds 300

Rust

Rust Documentation

Name
Description
Default value
Read Only
RUSTUP_CHANNEL Require a specific channel version with beta, nightly, or a specifiv version like 1.13.0

Elixir

Folder in which your Phoenix assets are located.
Name
Description
Read Only
CC_PHOENIX_ASSETS_DIR
CC_PHOENIX_DIGEST_GOAL Phoenix digest goal. phx.digest
CC_PHOENIX_SERVER_GOAL Phoenix server goal. phx.server

FS Bucket

FS Bucket Documentation

Name
Description
Default value
Read Only
BUCKET_HOST Hostname of the bucket X
CC_FS_BUCKET Defines which bucket to mount on which path

MongoDB

MongoDB Documentation

Name
Description
Default value
Read Only
MONGODB_ADDON_DB Generated upon creation X
MONGODB_ADDON_PASSWORD Generated upon creation X
MONGODB_ADDON_USER Generated upon creation X

MySQL

MySQL Documentation

Name
Description
Default value
Read Only
MYSQL_ADDON_DB Generated upon creation X
MYSQL_ADDON_PASSWORD Generated upon creation X
MYSQL_ADDON_ROLE Generated upon creation X
MYSQL_ADDON_USER Generated upon creation X

PostgreSQL

PostgreSQL Documentation

Name
Description
Default value
Read Only
POSTGRESQL_ADDON_DB Generated upon creation X
POSTGRESQL_ADDON_PASSWORD Generated upon creation X
POSTGRESQL_ADDON_ROLE Generated upon creation X
POSTGRESQL_ADDON_USER Generated upon creation X

Redis

Redis Documentation

Name
Description
Default value
Read Only
REDIS_HOST Generated upon creation X
REDIS_PORT Generated upon creation X
REDIS_PASSWORD Generated upon creation X

New Relic

Name
Description
Default value
Read Only
NEWRELIC_APPNAME
NEWRELIC_LICENSE

Socks

Name
Description
Default value
Read Only
SOCKS_ADDON_HOST
SOCKS_ADDON_PORT
SOCKS_ADDON_PRIVATE_KEY

VPN

Name
Description
Default value
Read Only
VPN_ADDON_CRT
VPN_ADDON_CACRT
VPN_ADDON_KEY
VPN_ADDON_HOST
VPN_ADDON_PORT
VPN_ADDON_TAKEY
Edit me on GitHub