diff --git a/web.py b/web.py index bb701cd..d2b0e53 100644 --- a/web.py +++ b/web.py @@ -31,18 +31,18 @@ from pygments.formatters import HtmlFormatter # The root folder where Gitolite stores the repositories. This is used to find the # actual repositories. -GITOLITE_REPOSITORIES_ROOT = os.environ.get(GITOLITE_REPOSITORIES_ROOT, '/home/git/repositories') +GITOLITE_REPOSITORIES_ROOT = os.environ.get('GITOLITE_REPOSITORIES_ROOT') # These are only used when anonymous cloning over HTTPS -GITOLITE_SHELL = os.environ.get(GITOLITE_SHELL, '/home/git/bin/gitolite-shell') -GITOLITE_HTTP_HOME = os.environ.get(GITOLITE_HTTP_HOME, '/home/git') +GITOLITE_SHELL = os.environ.get('GITOLITE_SHELL') +GITOLITE_HTTP_HOME = os.environ.get('GITOLITE_HTTP_HOME') # The domain of this instance. This is only really used when displaying list addresses, # or when the domain needs to be displayed on some pages. -INSTANCE_DOMAIN = 'domain.local' +INSTANCE_DOMAIN = os.environ.get('INSTANCE_DOMAIN') # How many commits to show in the log page -LOG_PAGINATION = 100 +LOG_PAGINATION = os.environ.get('LOG_PAGINATION') # Enable +/- file stats in the log page. Can be disabled for performance, since # computing diffstat on many commits for big repos could take too long. diff --git a/web.service b/web.service index 78ae620..31cf945 100644 --- a/web.service +++ b/web.service @@ -3,10 +3,22 @@ Description=Gunicorn instance to serve CLIF After=network.target [Service] +# The root folder where Gitolite stores the repositories. +# Environment=GITOLITE_REPOSITORIES_ROOT=/home/git/repositories + +# These are only used when anonymous cloning over HTTPS +# Environment=GITOLITE_SHELL=/home/git/bin/gitolite-shell +# Environment=GITOLITE_HTTP_HOME=/home/git + +Environment=INSTANCE_DOMAIN=domain.local +Environment=LOG_PAGINATION=32 + User=git Group=git + WorkingDirectory=/home/git/clif ExecStart=/home/git/clif/venv/bin/gunicorn --workers 4 --bind localhost:5000 web:application + Restart=always [Install]