1. Ian Bicking
  2. silverlining


silverlining / docs / envvariables.txt

Environmental Variables

This document describes all the environmental variables that Silver
Lining creates, that an application might want to use (or just might


    This gives the version in the form ``context/version``, like
    ``silverlining/0.0`` or ``devel/0.0``.  Having not had a release,
    there is no real version information yet, but this can be used to
    detect the difference between production and development
    environments.  (Also ``silversupport.env.is_production()`` does


    This is the name of the instance/deployment.


    This is the portion of the path that was matched during dispatch.
    For instance if you upload an app to ``site.example.com/blog``
    then ``SILVER_MATCH_PATH`` will be ``/blog``.


    This is the name of the application.  If ``SILVER_INSTANCE_NAME`` is
    ``blog.20100319_004`` then this will probably be ``blog``.


    This is a directory that contains the application's configuration
    (as uploaded using ``silver update --config DIR``).


    This is what *might* be considered the "canonical" (i.e., main)
    hostname of the application.  This is calculated as the *shortest*
    hostname possible.  When only one hostname is mapped to an
    application this is always correct.


    This is a directory where log files should be kept.  This is a
    per-application directory.  In development it will be in
    ``silver-logs/`` under your application's main directory (what you
    created with ``silver init``).


    This is the naming convention for all the information coming from


    This points to a place to put "temporary" files.  These are files
    that don't have to exist forever (the ``service.files`` service
    and ``CONFIG_FILES`` should be used for such files), but is a good
    place to put cache files.  You can also keep files in ``/tmp`` but
    using ``TEMP`` is more cleanly.  Some modules like `tempfile
    <http://docs.python.org/library/tempfile.html>`_ will
    automatically look at this variable.

    This directory is cleared everytime the application is uploaded.