Search

13.5.3. Directory Environment Variables

download PDF
Directory environment variables return the directories where an application resides. These variables are always available to the application, regardless of which cartridges the application is using.
Table 13.4. Directory Environment Variables
Environment Variable Name Purpose
OPENSHIFT_HOMEDIR The home directory of the application.
OPENSHIFT_DATA_DIR A persistent data directory.
OPENSHIFT_REPO_DIR Repository containing the currently deployed version of the application.
OPENSHIFT_TMP_DIR A temporary directory you can use; SELinux protects data in this directory from other users.
OPENSHIFT_LOG_DIR Where all cartridge logs are stored.

Note

Many of these directories are emptied and rebuilt whenever new code is pushed to an application. The only persistent directory is OPENSHIFT_DATA_DIR. Therefore, Red Hat recommends that you store persistent files in the OPENSHIFT_DATA_DIR directory.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.