Environment Variables Substitutions

Environment Variables on Steroids

It is possible to replace certain placeholders in environment variable values for configuring things like dependency hostnames, public endpoints, acquiring items from resource pool etc. Here's an exhaustive list of all such placeholders you can use:


Gets replaced by the hostname of the container.

Example : "REDIS_URL" => "redis://${DOCKUP_SERVICE_redis}:6379"

becomes "REDIS_URL" => "redis://redis-123-service:6379"


Given a public port on a container, this gets replaced by the hostname.

Example: "MYAPP_LOGIN" => "${DOCKUP_PORT_ENDPOINT_myapp_3000}/login"

becomes "MYAPP_LOGIN" => "dockup-123.dockup.mycompany.com/login"


Given a proxy name, this gets replaced by the hostname.

Example: "MYAPP_LOGIN" => "${DOCKUP_PROXY_ENDPOINT_myproxy}/login"

becomes "MYAPP_LOGIN" => "dockup-123.dockup.mycompany.com/login"


Given a pool name, this reserves a free pool item from this pool for the deployment and replaces the placeholder with its value.

Example: "DB_NAME" => "${DOCKUP_POOL_dbpool}"

becomes "DB_NAME" => "dbpool-1"


You can even refer the same pool item multiple times in the same container or different containers (in the same blueprint) using the same environment variable. This is useful when you want to refer the same pool item value in multiple containers. For example, say you want refer the database url obtained from resource pool in the multiple containers.

Example: "DB_NAME" => "${DOCKUP_POOL_databases_ID_dbpool}"

becomes "DB_NAME" => "dbpool-1"

Any number of calls return the same value as long as identifier "dbpool" is same.