Platform.sh Config Reader v0.1.2 API Reference
Modules
Reads Platform.sh configuration from environment variables.
See: https://docs.platform.sh/development/variables.html
The following are 'magic' properties that may exist on a Config object. Before accessing a property, check its
existence with hasattr(config, variableName). Attempting to access a nonexistent variable will throw an exception.
Attributes:
(The following properties are available at build time and run time.)
project (string):
The project ID.
application_name (string):
The name of the application, as defined in its configuration.
tree_id (string):
An ID identifying the application tree before it was built: a unique hash is generated based on the contents
of the application's files in the repository.
app_dir (string):
The absolute path to the application.
project_entropy (string):
A random string generated for each project, useful for generating hash keys.
(The following properties are only available at runtime.)
branch (string):
The Git branch name.
environment (string):
The environment ID (usually the Git branch plus a hash).
document_root (string):
The absolute path to the web root of the application.
smtp_host (string):
The hostname of the Platform.sh default SMTP server (an empty string if emails are disabled on the
environment.
port (string):
The TCP port number the application should listen to for incoming requests.
socket (string):
The Unix socket the application should listen to for incoming requests.
. Platform.sh Environment Variables
https://docs.platform.sh/development/variables.html
if app is started as a release, add this config provider
Mix Tasks
mix compiler adding config to compile for convenience
hard alias to config+compile for convenience
Add mix tasks If app is started with mix, add this task beforehand
hard alias to config+run for convenience