mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
Add static file genration, and two maintenance tasks
This commit is contained in:
parent
f664045c5c
commit
82cddfa8f3
3 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
# https://docs.weblate.org/en/latest/admin/management.html#update-index
|
# https://docs.weblate.org/en/latest/admin/install.html#production-cron
|
||||||
# every 10 minutes
|
# Fulltext index updates
|
||||||
10 * * * * www-data cd "__FINALPATH__" && python3 ./manage.py update_index
|
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
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# TODO: https://docs.weblate.org/en/latest/admin/install.html#migrating-database
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC START
|
# GENERIC START
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -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
|
# https://docs.weblate.org/en/latest/admin/install.html#filling-up-the-database
|
||||||
#==========================================
|
#==========================================
|
||||||
|
|
||||||
|
# set up database
|
||||||
sudo $final_path/manage.py migrate --noinput
|
sudo $final_path/manage.py migrate --noinput
|
||||||
|
# generate static files
|
||||||
|
sudo $final_path/manage.py collectstatic --noinput
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP CRON
|
# SETUP CRON
|
||||||
|
|
Loading…
Reference in a new issue