1 Note that these instructions are a work in progress and will change during the prototyping phase.
3 1. install these files to a convenient location, e.g. /opt/yt, and change into the directory
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
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
17 pip3 install -r config/requirements.txt
19 4. configure everything (see comments within these files):
21 gunicorn-frontend-config.py -> https://docs.gunicorn.org/en/stable/settings.html
22 gunicorn-webhooks-config.py
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)
31 8. install cronjobs (once per day, time doesn't matter)
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