Klaus: Difference between revisions
imported>Fin444 Created page with " The recommended method for deploying Klaus according to the developer is using uWSGI or Gunicorn. This article provides an example deployment using uWSGI. <syntaxhighlight l..." |
mNo edit summary |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
[https://github.com/jonashaag/klaus Klaus] is a simple, easy-to-set-up Git web viewer. | |||
The recommended method for deploying Klaus according to the developer is using uWSGI or Gunicorn. This article provides an example deployment using uWSGI. | The recommended method for deploying Klaus according to the developer is using uWSGI or Gunicorn. This article provides an example deployment using uWSGI. | ||
| Line 11: | Line 12: | ||
http-socket = ":8080"; | http-socket = ":8080"; | ||
module = "klaus.contrib.wsgi:application"; | module = "klaus.contrib.wsgi:application"; | ||
pythonPackages = self: with self; [ | pythonPackages = self: with self; [ | ||
klaus | klaus | ||
| Line 17: | Line 17: | ||
]; | ]; | ||
env = [ | env = [ | ||
" | "KLAUS_REPOS=/repos/repo1 /repos/repo2" | ||
"PATH=${pkgs.git}/bin" # klaus makes a direct call to git | "PATH=${pkgs.git}/bin" # klaus makes a direct call to git | ||
]; | ]; | ||
| Line 28: | Line 28: | ||
== Autoreloading == | == Autoreloading == | ||
By default, Klaus will | By default, Klaus will only be able to to track the repos specified in the <code>KLAUS_REPOS</code> environment variable. In order to have it keep track of a set of unknown repos, Klaus needs to be configured to autoreload. | ||
<syntaxhighlight lang="nix> | <syntaxhighlight lang="nix> | ||
| Line 35: | Line 35: | ||
enable-threads = true; | enable-threads = true; | ||
lazy-apps = true; | lazy-apps = true; | ||
env = [ "KLAUS_REPOS_ROOT=/repos" ]; | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Web Applications]] | |||