Diff between 3d2ecf3d148069ba72da9d81b030d7cecb459711 and de2341ff5b4a0cf956d8e31576fadb7243c9a2c6

Changed Files

File Additions Deletions Status
README.md +32 -2 modified

Full Patch

diff --git a/README.md b/README.md
index 3ee97a5..2fb74b8 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,37 @@ Fast webview using pygit2 (lib2git) bindings. For my personal use, for now
    ```bash
    pip install -r requirements.txt
    ```
+2. Create a git server: https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server
+3. Set the `GIT_REPO_PATH` in .env to point to your git repositories dir
+4. Create a systemd service to run the app (optional)
+```ini
+# /etc/systemd/system/py-gitweb.service
+[Unit]
+Description="mirrin lipasto"
+After=network.target
 
-2. Set the `GIT_REPO_PATH` in .env
+[Service]
+User=USERNAME
+Group=www-data
+SupplementaryGroups=GITUSERGROUP # optional
+WorkingDirectory=/home/USERNAME/py-gitweb/
+Environment="PATH=/home/USERNAME/py-gitweb/.venv/bin:/usr/local/bin:/usr/bin:/bin"
+ExecStart=/home/USERNAME/py-gitweb/.venv/bin/gunicorn --bind unix:py-gitweb.sock --workers=4 --log-level=debug -m 007 wsgi:app
+
+[Install]
+WantedBy=multi-user.target
+```
+5. Setup nginx or apache to serve the app (optional)
+```nginx
+# example nginx config
+server {
+   server_name git.mirrinlipasto.fi;
+   location / {
+      include proxy_params;
+      proxy_pass http://unix:/home/USERNAME/py-gitweb/py-gitweb.sock;
+   }
+}
+```
+
+Note: Libgit2 might have some issues with git.safe dir settings. If you run into issues, try setting `git config --global --add safe.directory '*'`
 
-...
\ No newline at end of file