cleanup and fixes migrate command (VERSION file or directory not found)

This commit is contained in:
Thomas 2024-01-04 10:23:08 +01:00 committed by GitHub
parent 9fa0be238f
commit 82bd01a73d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View file

@ -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"

View file

@ -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

View file

@ -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