From c1aa604144a328a96b545a8df541b24bd4c325ac Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Tue, 23 Jan 2024 17:45:35 +0100 Subject: [PATCH] some cleaning --- conf/settings.py | 1 + manifest.toml | 2 +- scripts/install | 1 - scripts/upgrade | 3 +++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conf/settings.py b/conf/settings.py index f272876..7c1229d 100644 --- a/conf/settings.py +++ b/conf/settings.py @@ -154,6 +154,7 @@ USE_TZ = True DEFAULT_AUTO_FIELD = "django.db.models.AutoField" # URL prefix to use, please see documentation for more details +# WARNING: this must be without trailing slash (this is why we set __PATH2__ (cf. loaded settings in install and upgrade)) URL_PREFIX = "__PATH2__" # Absolute filesystem path to the directory that will hold user-uploaded files. diff --git a/manifest.toml b/manifest.toml index 908a943..ce2f08b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -93,7 +93,7 @@ ram.runtime = "3G" main.default = 8080 [resources.apt] - #first § = weblate dependecies, second § = borgbackup dependencies + #first = weblate dependecies, after hub = borgbackup dependencies packages = "libxml2-dev, libxslt-dev, libfreetype6-dev, libjpeg-dev, libz-dev, libyaml-dev, libffi-dev, libcairo-dev, gir1.2-pango-1.0, libgirepository1.0-dev, libacl1-dev, libssl-dev, libpq-dev, libjpeg62-turbo-dev, build-essential, python3-gdbm, python3-dev, python3-pip, python3-venv, python3-virtualenv, virtualenv, git, uwsgi, uwsgi-plugin-python3, redis-server, postgresql, postgresql-contrib, hub, libacl1-dev, libacl1, libssl-dev, liblz4-dev, libzstd-dev, libxxhash-dev, build-essential, pkg-config, python3-pkgconfig" [resources.database] diff --git a/scripts/install b/scripts/install index 63e75fa..92ae346 100755 --- a/scripts/install +++ b/scripts/install @@ -124,7 +124,6 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 redis_db=$(ynh_redis_get_free_db) ynh_app_setting_set --app=$app --key=redis_db --value="$redis_db" -#path="${path%/}" settings="$install_dir/venv/lib/$weblate_pypath/site-packages/weblate/settings.py" set_forge_variables diff --git a/scripts/upgrade b/scripts/upgrade index 2c0b395..b73554e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,6 +17,9 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 admin_mail=$(ynh_user_get_info --username="$admin" --key=mail) key=$(ynh_string_random --length=50) +# Remove trailing "/" for next commands +path2=${path%/} + #================================================= # CHECK VERSION #=================================================