From d04237b00d59d1a947ff70dd2c429a0dae57292b Mon Sep 17 00:00:00 2001 From: Luka Hietala Date: Mon, 8 Dec 2025 20:16:05 +0200 Subject: [PATCH] start complete refactor --- README | 1 + README.md | 69 ------------------------------------------------------- 2 files changed, 1 insertion(+), 69 deletions(-) create mode 100644 README delete mode 100644 README.md diff --git a/README b/README new file mode 100644 index 0000000..708219a --- /dev/null +++ b/README @@ -0,0 +1 @@ +Fast and simple git webview. Using Libgit2 as the backend. \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 3c979a3..0000000 --- a/README.md +++ /dev/null @@ -1,69 +0,0 @@ -Fast webview using pygit2 (lib2git) bindings. For my personal use, for now - -BETTER DOCS SOON - -image - -## Setup - -1. Install dependencies - - ```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/lipasto.service -[Unit] -Description="mirrin lipasto" -After=network.target - -[Service] -User=USERNAME -Group=www-data -SupplementaryGroups=GITUSERGROUP # optional -WorkingDirectory=/home/USERNAME/lipasto/ -Environment="PATH=/home/USERNAME/lipasto/.venv/bin:/usr/local/bin:/usr/bin:/bin" -ExecStart=/home/USERNAME/lipasto/.venv/bin/gunicorn --bind unix:lipasto.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/lipasto/py-gitweb.sock; - } -} - -# if gitdaemon -location ~ ^/git/([^/]+)(/.*)?$ { - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; - fastcgi_param GIT_PROJECT_ROOT /srv/git; - fastcgi_param GIT_HTTP_EXPORT_ALL "1"; - fastcgi_param PATH_INFO /$1$2; - fastcgi_param REQUEST_METHOD $request_method; - fastcgi_param QUERY_STRING $query_string; - fastcgi_pass unix:/var/run/fcgiwrap.socket; -} - -# sudo apt install fcgiwrap spawn-fcgi -``` - -Note: Libgit2 might have some issues with git.safe dir settings. If you run into issues, try setting `git config --global --add safe.directory '*'` - -image -image -image -image - - - - -- 2.47.3