Changeset - 470436f288a7
[Not reviewed]
stable
0 2 0
Mads Kiilerich (kiilerix) - 3 months ago 2019-04-30 22:57:04
mads@kiilerich.com
Replaced by: e54b5aa5b000
docs: outline the challenges of specifying a locale for services

Trying to embed the most essential parts of
http://blog.dscpl.com.au/2014/09/setting-lang-and-lcall-when-using.html and
https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIDaemonProcess.html
.
2 files changed with 24 insertions and 2 deletions:
1 comment (0 inline, 1 general)
docs/overview.rst
Show inline comments
...
 
@@ -37,6 +37,28 @@ environment used for running Kallithea.
 
We recommend using virtualenv for installing Kallithea.
 

	
 

	
 
Locale environment
 
------------------
 

	
 
The locale configuration is also a part of the environment. On Unix,
 
environment variables like LANG or LC_ALL can specify a language and encoding
 
to use for code points outside the ASCII range. The flexibility of supporting
 
multiple encodings of Unicode has the flip site of having to specify which
 
encoding to use - especially for Mercurial.
 

	
 
It varies which settings are available. For example, some Docker containers
 
with Debian default to only support the `C` language, while other Linux
 
environments have `en_US` but not `C`. The `locale -a` command will show which
 
values are supported.
 

	
 
For technical reasons, this configuration *must* be provided in the environment
 
- it cannot be specified in the `.ini` file. Desktop sessions usually set the
 
environment variables to use some language (like `en_US`) and encoding (like
 
`UTF-8`). Services like Kallithea often run in a sanitized environment that is
 
using the default language `C` and the ASCII encoding. The locale must thus be
 
specified explicitly for the service.
 

	
 

	
 
Installation methods
 
--------------------
 

	
docs/setup.rst
Show inline comments
...
 
@@ -511,7 +511,7 @@ Here is a sample excerpt from an Apache 
 
.. code-block:: apache
 

	
 
    WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 \
 
        python-home=/srv/kallithea/venv
 
        python-home=/srv/kallithea/venv lang=C.UTF-8
 
    WSGIProcessGroup kallithea
 
    WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
 
    WSGIPassAuthorization On
...
 
@@ -520,7 +520,7 @@ Or if using a dispatcher WSGI script wit
 

	
 
.. code-block:: apache
 

	
 
    WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100
 
    WSGIDaemonProcess kallithea processes=5 threads=1 maximum-requests=100 lang=en_US.utf8
 
    WSGIProcessGroup kallithea
 
    WSGIScriptAlias / /srv/kallithea/dispatch.wsgi
 
    WSGIPassAuthorization On
Mads Kiilerich (kiilerix) 3 months and 25 days ago on this changeset
@patrickdp will you try copyediting this (and mention Issue#340) and push it?
1 comment (0 inline, 1 general)