Go to file
Drew DeVault b5941bc952 AGPL 2017-04-08 17:06:51 -04:00
gitsrht Update git-srht-keys to use access module 2017-04-07 13:36:13 -04:00
scss Refactor access controls and add repo edit 2017-04-06 16:07:58 -04:00
.gitignore Implement authorized keys command 2017-04-02 06:51:26 -04:00
.gitmodules Update SCSS to srht standard 2017-02-05 17:41:17 -05:00
LICENSE AGPL 2017-04-08 17:06:51 -04:00
Makefile Implement authorized keys command 2017-04-02 06:51:26 -04:00
README Initial commit 2017-02-04 23:32:51 -05:00
git-srht-keys Update git-srht-keys to use access module 2017-04-07 13:36:13 -04:00
run.py git -> gitsrht (module rename) 2017-02-08 06:16:50 -05:00
setup.py Move hooks into module 2017-04-02 14:26:39 -04:00
static Implement authorized keys command 2017-04-02 06:51:26 -04:00

README

                                   git.sr.ht

Handles account management for sr.ht sites.

DEPENDENCIES

- Python 3
- sass
- PostgreSQL

Python packages:

- flask
- flask-login
- sqlalchemy
- sqlalchemy-utils

DEVELOPMENT

1. Prepare a PostgreSQL connection string and SMTP credentials
2. Copy config.ini.example to config.ini and edit to your liking
3. make (or `make watch` to watch for changes)
4. python3 app.py
5. View http://localhost:5001 in your browser

INSTALLATION

Note: by default `make install` installs a systemd unit to /etc/systemd/system.

1. Prepare a PostgreSQL connection string and SMTP credentials
2. sudo make install
3. Edit /etc/sr.ht/git.ini to your liking
4. Configure an nginx reverse proxy to point to localhost:8000
5. systemctl enable git.sr.ht
6. systemctl start git.sr.ht

UPGRADE PROCEDURE

Before attempting any upgrades, you have to configure your install for database
migrations. Edit /etc/sr.ht/git.alembic.ini to your liking and use the
following procedure to mark the database as current:

1. sudo systemctl stop git.sr.ht
2. alembic stamp head
3. sudo systemctl start git.sr.ht

This only needs to be done once.

To upgrade to a new version of git.sr.ht, perform the following procedure from
the new source tree:

1. sudo systemctl stop git.sr.ht
2. sudo make install
3. alembic upgrade
4. sudo systemctl start git.sr.ht