PageRenderTime 28ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/envvariables.txt

https://bitbucket.org/ianb/silverlining/
Plain Text | 66 lines | 46 code | 20 blank | 0 comment | 0 complexity | e4f1f6438fd0ece6ca297e53def468fb MD5 | raw file
Possible License(s): GPL-2.0
  1. Environmental Variables
  2. =======================
  3. This document describes all the environmental variables that Silver
  4. Lining creates, that an application might want to use (or just might
  5. notice).
  6. ``SILVER_VERSION``:
  7. This gives the version in the form ``context/version``, like
  8. ``silverlining/0.0`` or ``devel/0.0``. Having not had a release,
  9. there is no real version information yet, but this can be used to
  10. detect the difference between production and development
  11. environments. (Also ``silversupport.env.is_production()`` does
  12. this.)
  13. ``SILVER_INSTANCE_NAME``:
  14. This is the name of the instance/deployment.
  15. ``SILVER_MATCH_PATH``:
  16. This is the portion of the path that was matched during dispatch.
  17. For instance if you upload an app to ``site.example.com/blog``
  18. then ``SILVER_MATCH_PATH`` will be ``/blog``.
  19. ``SILVER_APP_NAME``:
  20. This is the name of the application. If ``SILVER_INSTANCE_NAME`` is
  21. ``blog.20100319_004`` then this will probably be ``blog``.
  22. ``SILVER_APP_CONFIG``:
  23. This is a directory that contains the application's configuration
  24. (as uploaded using ``silver update --config DIR``).
  25. ``SILVER_CANONICAL_HOSTNAME``:
  26. This is what *might* be considered the "canonical" (i.e., main)
  27. hostname of the application. This is calculated as the *shortest*
  28. hostname possible. When only one hostname is mapped to an
  29. application this is always correct.
  30. ``SILVER_LOGS``:
  31. This is a directory where log files should be kept. This is a
  32. per-application directory. In development it will be in
  33. ``silver-logs/`` under your application's main directory (what you
  34. created with ``silver init``).
  35. ``CONFIG_*``:
  36. This is the naming convention for all the information coming from
  37. services.
  38. ``TEMP``:
  39. This points to a place to put "temporary" files. These are files
  40. that don't have to exist forever (the ``service.files`` service
  41. and ``CONFIG_FILES`` should be used for such files), but is a good
  42. place to put cache files. You can also keep files in ``/tmp`` but
  43. using ``TEMP`` is more cleanly. Some modules like `tempfile
  44. <http://docs.python.org/library/tempfile.html>`_ will
  45. automatically look at this variable.
  46. This directory is cleared everytime the application is uploaded.