From 82bd01a73d8020719606e575e14088c2ca61a0d0 Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Thu, 4 Jan 2024 10:23:08 +0100 Subject: [PATCH] cleanup and fixes migrate command (VERSION file or directory not found) --- manifest.toml | 2 +- scripts/install | 11 ++++++----- scripts/upgrade | 2 ++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/manifest.toml b/manifest.toml index 06d765f..ad98c74 100644 --- a/manifest.toml +++ b/manifest.toml @@ -21,7 +21,7 @@ fund = ["https://patreon.com/bookwyrm", "https://opencollective.com/bookwyrm"] [integration] yunohost = ">= 11.2" architectures = "all" -multi_instance = true +multi_instance = false ldap = false sso = false disk = "50M" diff --git a/scripts/install b/scripts/install index bee052d..f35c91b 100755 --- a/scripts/install +++ b/scripts/install @@ -21,12 +21,11 @@ ynh_script_progression --message="Setting up source files..." --weight=1 ynh_setup_source --dest_dir="$install_dir" --source_id="main" ynh_setup_source --dest_dir="$install_dir/static/fonts/source_han_sans" --source_id="fonts" -#temporary try -#cp -rp $install_dir/VERSION $install_dir/bookwyrm/ -#pushd $install_dir -#ynh_exec_warn_less wget https://ci-apps-bookworm-dev.yunohost.org/ci/logs/198.log -#popd + + + + # Set permissions to app files chmod -R o-rwx "$install_dir" @@ -50,10 +49,12 @@ $install_dir/venv/bin/pip3 install -r "$install_dir/requirements.txt" #================================================= ynh_script_progression --message="Initializing database..." --weight=1 +pushd $install_dir $install_dir/venv/bin/python3 "$install_dir/manage.py" migrate $install_dir/venv/bin/python3 "$install_dir/manage.py" initdb $install_dir/venv/bin/python3 "$install_dir/manage.py" compile_themes $install_dir/venv/bin/python3 "$install_dir/manage.py" collectstatic --no-input +popd #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 660b18c..f12c2e5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,11 +77,13 @@ $install_dir/venv/bin/pip3 install -r "$install_dir/requirements.txt" #================================================= ynh_script_progression --message="Upgrading database..." --weight=1 +pushd $install_dir $install_dir/venv/bin/python3 "$install_dir/manage.py" compile_themes $install_dir/venv/bin/python3 "$install_dir/manage.py" collectstatic --no-input $install_dir/venv/bin/python3 "$install_dir/manage.py" populate_streams $install_dir/venv/bin/python3 "$install_dir/manage.py" makemigrations --merge --noinput $install_dir/venv/bin/python3 "$install_dir/manage.py" migrate +popd #================================================= # SET PERMISSIONS ON BOOKWYRM DIRECTORY