diff --git a/INSTALL.md b/INSTALL.md index ce3c9722..1cb32063 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -221,6 +221,12 @@ also [see this](https://pganalyze.com/blog/5mins-postgres-tuning-huge-pages). (PgBouncer)[https://www.pgbouncer.org] can be helpful in a high traffic situation. +--- + + +Background services +--- + Gunicorn and Celery need to run as background services: ### Gunicorn @@ -319,7 +325,11 @@ Inspect log files at: /your_piefed_installation/logs/pyfedi.log -### Nginx +--- + + +Nginx +--- You need a reverse proxy that sends all traffic to port 5000. Something like: @@ -357,3 +367,23 @@ You need a reverse proxy that sends all traffic to port 5000. Something like: The above is not a complete configuration - you will want to add more settings for SSL, etc. +--- + + +Cron tasks +--- + +To send email reminders about unread notifications, put this in a new file under /etc/cron.d + +``` +1 */6 * * * rimu cd /home/rimu/pyfedi && /home/rimu/pyfedi/email_notifs.sh +``` + +Change /home/rimu/pyfedi to the location of your installation and change 'rimu' to the user that piefed runs as. + +Once a week or so it's good to run remove_orphan_files.sh to save disk space: + +``` +5 4 * * 1 rimu cd /home/rimu/pyfedi && /home/rimu/pyfedi/remove_orphan_files.sh +``` + diff --git a/remove_orphan_files.sh b/remove_orphan_files.sh new file mode 100755 index 00000000..305694df --- /dev/null +++ b/remove_orphan_files.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source venv/bin/activate +export FLASK_APP=pyfedi.py +flask remove_orphan_files