]> git.gir.st - subscriptionfeed.git/blob - INSTALL
fix loading webhooks as frontend module, simplify startup.sh
[subscriptionfeed.git] / INSTALL
1 Note that these instructions are a work in progress and will change during the prototyping phase.
2
3 1. install these files to a convenient location, e.g. /opt/yt, and change into the directory
4 git clone ... /opt/yt
5 cd /opt/yt
6 2. create sqlite database and put filename in config.ini
7 sqlite3 subscriptions.sqlite < config/setup.sql
8 2a. pre-populate (anonymous) guest user with subscriptions and subreddits
9 sqlite3 subscriptions.sqlite < config/guest.sql
10 3. create a user for yourself
11 USERN=your_name
12 PASSWD=$(./config/generate-passwd.py) # will ask
13 TOKEN=$(head -c16 </dev/urandom|base64|tr /+ _-|tr -d =)
14 echo "INSERT INTO users(name, password, token) VALUES ('$USERN','$PASSWD','$TOKEN')" |
15 sqlite3 subscriptions.sqlite
16 3. install virtual environment
17 python3 -m venv venv
18 . venv/bin/activate
19 pip3 install -r config/requirements.txt
20 deactivate
21 4. configure everything (see comments within these files):
22 config.ini
23 gunicorn-frontend-config.py -> https://docs.gunicorn.org/en/stable/settings.html
24 gunicorn-webhooks-config.py
25 startup.sh
26 5. for now, edit app/common/utils.py to point to your venv
27 6. manually trigger cronjobs
28 ./app/utils/refresh-cipher.pl
29 ./app/common/utils.py pull
30 ./app/common/utils.py websub
31 7. start the web servers (it is recommended to create init/systemd files)
32 ./config/startup.sh
33 8. install cronjobs (once per day, time doesn't matter)
34 YT_DIR=/opt/yt
35 YT_CONFIG=/opt/yt/config/config.ini
36 19 21 * * * $YT_DIR/app/common/utils.py pull
37 03 13 * * * $YT_DIR/app/common/utils.py websub
38 52 02 * * * $YT_DIR/app/common/utils.py cipher
Imprint / Impressum