]> git.gir.st - subscriptionfeed.git/blob - INSTALL
make __main__.py less fragile
[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 3. create a user for yourself
9 USERN=your_name
10 PASSWD=$(./config/generate-passwd.py) # will ask
11 TOKEN=$(head -c16 </dev/urandom|base64|tr /+ _-|tr -d =)
12 echo "INSERT INTO users(name, password, token) VALUES ('$USERN','$PASSWD','$TOKEN')" |
13 sqlite3 subscriptions.sqlite
14 3. install virtual environment
15 python3 -m venv venv
16 . venv/bin/activate
17 pip3 install -r config/requirements.txt
18 deactivate
19 4. configure everything (see comments within these files):
20 config.ini
21 gunicorn-frontend-config.py -> https://docs.gunicorn.org/en/stable/settings.html
22 gunicorn-webhooks-config.py
23 startup.sh
24 5. for now, edit pull-subs and update-subs to point to your venv
25 6. manually trigger cronjobs
26 ./app/refresh-cipher.pl
27 ./app/pull-subscriptions.py
28 ./app/update-subscriptions.py
29 7. start the web servers (it is recommended to create init/systemd files)
30 ./config/startup.sh
31 8. install cronjobs (once per day, time doesn't matter)
32 YT_DIR=/opt/yt
33 YT_CONFIG=/opt/yt/config/config.ini
34 19 21 * * * $YT_DIR/pull-subscriptions.py
35 03 13 * * * $YT_DIR/update-subscriptions.py
36 52 02 * * * $YT_DIR/refresh-cipher.pl
Imprint / Impressum