diff --git a/conf/cron_weblate b/conf/cron_weblate index 6b5febf..198016e 100644 --- a/conf/cron_weblate +++ b/conf/cron_weblate @@ -1,3 +1,9 @@ -# https://docs.weblate.org/en/latest/admin/management.html#update-index -# every 10 minutes +# https://docs.weblate.org/en/latest/admin/install.html#production-cron +# Fulltext index updates 10 * * * * www-data cd "__FINALPATH__" && python3 ./manage.py update_index + +# Cleanup stale objects +@daily cd "__FINALPATH__" && ./manage.py cleanuptrans + +# Commit pending changes after 96 hours +@hourly cd "__FINALPATH__" && ./manage.py commit_pending --all --age=96 --verbosity=0 diff --git a/scripts/backup b/scripts/backup index 2c52551..efca4fa 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,7 +1,5 @@ #!/bin/bash -# TODO: https://docs.weblate.org/en/latest/admin/install.html#migrating-database - #================================================= # GENERIC START #================================================= diff --git a/scripts/install b/scripts/install index 6333d2e..6f23e7f 100755 --- a/scripts/install +++ b/scripts/install @@ -159,7 +159,10 @@ ynh_replace_string "__KEY__" "$key" $final_path/weblate/settings.py # https://docs.weblate.org/en/latest/admin/install.html#filling-up-the-database #========================================== +# set up database sudo $final_path/manage.py migrate --noinput +# generate static files +sudo $final_path/manage.py collectstatic --noinput #================================================= # SETUP CRON