Helion Stackato exposes a number of predefined environment variables during runtime (including hook processing, cron jobs and ssh commands).
You can set your own environment variables:
env: block in manifest.ymlNote
To see a complete list of environment variables in a Helion Stackato application container, deploy the node-env sample.
DATABASE_URLContains an access URL for a database service. If more than one type
of database is present, DATABASE_URL will not be available.
Instead, use the Database Specific URL variables below. Example:
mysql://u93Mm8XmGXQ9R:p8LwNeQXMrNzi@192.168.0.112:3306/d0a60c0be931f4982bbef153f993237bc
HOME/home/stackato/app/ by default.HTTP_PROXYMEMCACHED_URLMEMORY_LIMITMONGODB_URLMYSQL_URLPATH:, which are to be searched for the names of executable files
to be interpreted as commands.PIP_OPTSCustom/alternate PIP repo location. For example:
env:
PIP_OPTS: "--extra-index-url=http://company.com/inhouse-pypi-mirror"
PORTVCAP_APP_PORT.POSTGRESQL_URLPROCESSES_WEBThis variable contains the default start command that would be used when manifest.yml does not override it. It is provided so that users can specify a wrapper around the default command. For example:
processes:
web: newrelic_wrapper $PROCESSES_WEB
Note
PROCESSES_WEB may be undefined when Helion Stackato cannot determine the
default command (for example, because the app uses a non-standard main application file).
PYPM_OPTSCustom/alternate PyPM repo location. Repo mirroring is sort of undocumented feature. Example:
env:
PYPM_OPTS: "-R http://pypm-free.activestate.com/2.7/linux-x86_64/"
RABBITMQ_URLREDIS_URLSTACKATO_APP_ENVNote
Internal use, subject to change.
Contains a list of all environment variables set with stackato env-add or in manifest.yml.
STACKATO_APP_NAMEmanifest.yml). Available during staging as well as in the
application instance.STACKATO_APP_NAME_UPCASEContains the same value as STACKATO_APP_NAME transformed to
uppercase, with dashes replaced by underscores. For example if
STACKATO_APP_NAME is php-info, then STACKATO_APP_NAME_UPCASE will
be PHP_INFO.
This makes it possible to access the environment variables for harbor and filesystem services.
STACKATO_APP_ROOTThis is the root directory from the Helion Stackato point of view.
It contains app specific HOME directory (app/), the log file directory
(logs/) and various scripts.
The HOME environment variable actually points to the app directory,
which commonly looks like the directory uploaded by the client. This is where
manifest.yml and all the application files are located.
STACKATO_DOCUMENT_ROOT$HOME (/home/stackato/app).STACKATO_FILESYSTEMIf the app uses a single filesystem service, then the local
mount point is stored in this variable.
If there is more than one filesystem service, STACKATO_FILESYSTEM is not available.
Instead, a custom environment variable STACKATO_FILESYSTEM_* will be created based on the
name of each filesystem service (with hyphens replaced by underscores).
For example, if your manifest.yml file configures the following services:
services:
my-data: filesystem
plugins: filesystem
Two environment variables would be created: STACKATO_FILESYSTEM_MY_DATA and STACKATO_FILESYSTEM_PLUGINS.
STACKATO_GROUPImportant
This variable is deprecated. It can be used only with Stackato 2.x.
Can be set in the local shell to specify the group
for the stackato client. When set, the stackato group
command is ignored until the variable is explicitly unset. If empty,
the client sets the group to none. Can be overridden with the
--group option.
STACKATO_LOG_FILESSTACKATO_SERVICESSTACKATO_TARGETstackato client. When set, the stackato target command
is ignored until the variable is explicitly unset. Can be overridden
with the --target option.STACKATO_UWSGISet by the Perl and Python frameworks only. It contains the default UWSGI start command to run the application via uwsgi. It is provided in case the user wants to add additional uwsgi options in manifest.yml:
processes:
web: $STACKATO_UWSGI --another-uwsgi-option
VCAP_APP_HOSTVCAP_APP_PORTVCAP_APPLICATIONVCAP_SERVICESThe following environment variables are available during application staging, and can be used in buildpacks or staging hooks:
BUILDPACK_CACHE: Filesystem location the buildpack uses to store assets during the build.http_proxy and https_proxy: The proxy host:port of the DEA running the staging container.STAGING_TIMEOUT: Time limit for staging to complete.USER: Will always be "stackato"Note
Service instance variables (for example, STACKATO_SERVICES and VCAP_SERVICES)
can change between staging and running. Do not save values from these
variables to config files during staging as the hard-coded values may
no longer be applicable after staging.