Aptible PaaS logoDocs

Aptible Metadata Variables

Aptible injects the following metadata keys as environment variables:

  • APTIBLE_PROCESS_TYPE
    • Represents the name of the Service this container belongs to. For example, if the Procfile defines the following services:
web: bundle exec rails s
worker: bundle exec sidekiq
    • Then, the containers for the web Service will run with APTIBLE_PROCESS_TYPE=web, and the containers for the worker Service will run with APTIBLE_PROCESS_TYPE=worker.
    • If there is no Procfile and users choose to use an Implicit Service instead, the variable is set to APTIBLE_PROCESS_TYPE=cmd.
  • APTIBLE_PROCESS_INDEX
    • All containers for a given Release of a Service are assigned a unique 0-based process index.
    • For example, if your web service is scaled to 2 containers, one will have APTIBLE_PROCESS_INDEX=0, and the other will have APTIBLE_PROCESS_INDEX=1.
  • APTIBLE_CONTAINER_SIZE
    • This variable represents the memory limit in MB of the Container. See Memory Limits for more information.
  • APTIBLE_LAYER
    • This variable represents whether the container is an App or Database container using App or Database values.
  • APTIBLE_GIT_REF
  • APTIBLE_ORGANIZATION_HREF
    • Aptible API URL representing the Organization this container belongs to.
  • APTIBLE_APP_HREF
    • Aptible API URL representing the App this container belongs to, if any.
  • APTIBLE_DATABASE_HREF
    • Aptible API URL representing the Database this container belongs to, if any.
  • APTIBLE_SERVICE_HREF
    • Aptible API URL representing the Service this container belongs to, if any.
  • APTIBLE_RELEASE_HREF
    • Aptible API URL representing the Release this container belongs to, if any.
  • APTIBLE_EPHEMERAL_SESSION_HREF
  • APTIBLE_RESOURCE_HREF
    • Aptible uses this variable internally. Do not depend on this value.
  • APTIBLE_ALLOCATION
    • Aptible uses this variable internally. Do not depend on this value.