From ba8b7468af911fee70e2dcbc4056f5b77fe06e76 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Sun, 21 Jan 2024 12:21:47 +0100 Subject: [PATCH] fix --- conf/nginx.conf | 6 +++--- scripts/install | 9 +++++++-- tests.toml | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2925a33..d8ae4c2 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,17 +2,17 @@ # https://github.com/WeblateOrg/weblate/blob/master/weblate/examples/weblate.nginx.conf location ~ ^__PATH__/favicon.ico$ { - alias __INSTALL_DIR__/cache/static/favicon.ico; + alias __INSTALL_DIR__/data/cache/static/favicon.ico; expires 30d; } location __PATH__/static/ { - alias __INSTALL_DIR__/cache/static/; + alias __INSTALL_DIR__/data/cache/static/; expires 30d; } location __PATH__/media/ { - alias __INSTALL_DIR__/media/; + alias __INSTALL_DIR__/data/media/; expires 30d; } diff --git a/scripts/install b/scripts/install index b3d66b0..e6ceb0c 100755 --- a/scripts/install +++ b/scripts/install @@ -155,13 +155,18 @@ ynh_script_progression --message="Filling up the database..." --weight=10 # the user needs to be weblate for postgresql ynh_exec_warn_less sudo --user=$app $install_dir/venv/bin/weblate migrate --noinput - # generate static files - ynh_exec_warn_less sudo --user=$app $install_dir/venv/bin/weblate collectstatic --noinput + ynh_exec_warn_less sudo --user=$app $install_dir/venv/bin/weblate createadmin --no-color \ --password "$password" \ --username "$admin" \ --email "$admin_mail" + # generate static files + ynh_exec_warn_less sudo --user=$app $install_dir/venv/bin/weblate collectstatic --noinput + + # https://docs.weblate.org/en/latest/admin/install/venv-debian.html + ynh_exec_warn_less sudo --user=$app $install_dir/venv/bin/weblate compress --noinput + # Check the configuration # This may fail in some cases with errors, etc., but the app works and the user can fix issues later. ynh_exec_warn_less sudo --user=$app $install_dir/venv/bin/weblate check --deploy || true diff --git a/tests.toml b/tests.toml index 40788e5..9156afc 100644 --- a/tests.toml +++ b/tests.toml @@ -16,6 +16,6 @@ test_format = 1.0 # Commits to test upgrade from # ------------------------------- - test_upgrade_from.2749e7b.name = "0.5.3 - packaging v1" + test_upgrade_from.2749e7b.name = "5.3.1 - packaging v1" \ No newline at end of file