1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00

using weblate instead of migrate, and add settings

This commit is contained in:
Jean-Baptiste Holcroft 2017-09-14 16:13:48 +02:00
parent 83dcebe850
commit fc932257b2
2 changed files with 6 additions and 6 deletions

View file

@ -1,9 +1,9 @@
# https://docs.weblate.org/en/latest/admin/install.html#production-cron
# Fulltext index updates
10 * * * * www-data cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && python3 ./manage.py update_index
10 * * * * www-data cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate update_index --settings weblate.settings
# Cleanup stale objects
@daily cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && ./manage.py cleanuptrans
@daily cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate cleanuptrans --settings weblate.settings
# Commit pending changes after 96 hours
@hourly cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && ./manage.py commit_pending --all --age=96 --verbosity=0
@hourly cd "__FINALPATH__" && source __FINALPATH__/venv/bin/activate && weblate commit_pending --all --age=96 --verbosity=0 --settings weblate.settings

View file

@ -83,7 +83,7 @@ ynh_app_setting_set $app db_name $db_name
ynh_mysql_setup_db $db_name $db_name
# https://docs.weblate.org/en/latest/admin/install.html#unicode-issues-in-mysql
ynh_mysql_execute_as_root "ALTER DATABASE weblate CHARACTER SET utf8mb4;"
ynh_mysql_execute_as_root "ALTER DATABASE $db_name CHARACTER SET utf8mb4;"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -167,9 +167,9 @@ ynh_replace_string "__KEY__" "$key" $final_path/weblate/settings.py
#==========================================
echo "SPECIFIC SETUP Filling up the database"
# set up database
source ${final_path}/venv/bin/activate && $final_path/manage.py migrate --noinput
source ${final_path}/venv/bin/activate && weblate migrate --noinput --settings weblate.settings
# generate static files
source ${final_path}/venv/bin/activate && $final_path/manage.py collectstatic --noinput
source ${final_path}/venv/bin/activate && weblate collectstatic --noinput --settings weblate.settings
#=================================================
# SETUP CRON