1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/funkwhale_ynh.git synced 2024-09-03 18:36:24 +02:00
* first test upgrade to 1.3.0

* Auto-update README

* fix

* fix

* fix

* fix

* fix

* add test from 1.2.10

* fix funkwhale-manage collectstatic

* fix path

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
Thomas 2023-06-03 11:02:04 +02:00 committed by GitHub
parent 45f65d68eb
commit 815fd032cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 33 additions and 38 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Funkwhale is a community-driven project that lets you listen and share music and audio within a decentralized, open network.
**Shipped version:** 1.2.10~ynh3
**Shipped version:** 1.3.0~ynh1
**Demo:** https://demo.funkwhale.audio

View file

@ -18,7 +18,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Funkwhale est un projet communautaire qui vous permet d'écouter et de partager de la musique et de l'audio au sein d'un réseau ouvert et décentralisé.
**Version incluse :** 1.2.10~ynh3
**Version incluse :** 1.3.0~ynh1
**Démo :** https://demo.funkwhale.audio

View file

@ -8,7 +8,7 @@ User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/api
EnvironmentFile=__INSTALL_DIR__/config/.env
ExecStart=__INSTALL_DIR__/virtualenv/bin/celery -A funkwhale_api.taskapp beat -l INFO
ExecStart=__INSTALL_DIR__/venv/bin/celery -A funkwhale_api.taskapp beat -l INFO
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these

View file

@ -8,7 +8,7 @@ User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/api
EnvironmentFile=__INSTALL_DIR__/config/.env
ExecStart=__INSTALL_DIR__/virtualenv/bin/gunicorn config.asgi:application -w ${FUNKWHALE_WEB_WORKERS} -k uvicorn.workers.UvicornWorker -b ${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}
ExecStart=__INSTALL_DIR__/venv/bin/gunicorn config.asgi:application -w ${FUNKWHALE_WEB_WORKERS} -k uvicorn.workers.UvicornWorker -b ${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}
# Denying access to capabilities that should not be relevant for webapps
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html

View file

@ -8,7 +8,7 @@ User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/api
EnvironmentFile=__INSTALL_DIR__/config/.env
ExecStart=__INSTALL_DIR__/virtualenv/bin/celery -A funkwhale_api.taskapp worker -l INFO --concurrency=0
ExecStart=__INSTALL_DIR__/venv/bin/celery -A funkwhale_api.taskapp worker -l INFO --concurrency=0
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these

View file

@ -5,7 +5,7 @@ name = "Funkwhale"
description.en = "Convivial and modern music server"
description.fr = "Serveur de musique moderne et convivial"
version = "1.2.10~ynh3"
version = "1.3.0~ynh1"
maintainers = ["Ciarán Ainsworth"]
@ -19,7 +19,7 @@ code = "https://dev.funkwhale.audio/funkwhale/funkwhale"
fund = "https://next.funkwhale.audio/donate/"
[integration]
yunohost = ">= 11.1.15"
yunohost = ">= 11.1.19"
architectures = "all"
multi_instance = true
ldap = false
@ -45,15 +45,15 @@ ram.runtime = "50M"
[resources]
[resources.sources]
[resources.sources.api]
url = "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/1.2.10/download?job=build_api"
sha256 = "c0a840f223b4a3a93ffb2639e1bacb709d8ec9ed62214b377971aad5c04ae815"
url = "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/1.3.0/download?job=build_api"
sha256 = "57323ce6641183bd33fcf3aa243b0b7aba667509da8c5c3446b73def40109650"
in_subdir = true
extract = true
format = "zip"
[resources.sources.front]
url = "https://dev.funkwhale.audio/funkwhale/funkwhale/builds/artifacts/1.2.10/download?job=build_front"
sha256 = "c8845317d1cc6aae7f46d1e69e22fa378c45b563e1ad1edd57d3db08af6f7a44"
url = "https://dev.funkwhale.audio/funkwhale/funkwhale/builds/artifacts/1.3.0/download?job=build_front"
sha256 = "8e17543cd688572f7e48c9c416ef33c065c7c6ac01b5ae85939632030a530bf0"
in_subdir = true
extract = true
format = "zip"
@ -71,7 +71,7 @@ ram.runtime = "50M"
main.url = "/"
[resources.apt]
packages = "postgresql curl python3-pip python3-venv git unzip libldap2-dev libsasl2-dev gettext-base zlib1g-dev libffi-dev libssl-dev build-essential ffmpeg libjpeg-dev libmagic-dev libpq-dev python3-dev make zlib1g-dev libffi-dev libssl-dev"
packages = "build-essential curl ffmpeg libjpeg-dev libmagic-dev libpq-dev postgresql postgresql-client postgresql-contrib python3-dev libldap2-dev libsasl2-dev make unzip zlib1g-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg-dev redis-server python3-venv git"
[resources.database]
type = "postgresql"

View file

@ -39,8 +39,8 @@ ynh_add_config --template="../conf/env.prod" --destination="$install_dir/config/
# MODIFY THE FEDERATION
#=================================================
source $install_dir/virtualenv/bin/activate
ynh_exec_warn_less python3 $install_dir/api/manage.py fix_federation_ids https://$old_domain https://$new_domain --no-dry-run --no-input
source $install_dir/venv/bin/activate
ynh_exec_warn_less ynh_exec_as $app $install_dir/venv/bin/funkwhale-manage fix_federation_ids https://$old_domain https://$new_domain --no-dry-run --no-input
#=================================================
# START SYSTEMD SERVICE

View file

@ -86,14 +86,10 @@ ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.serv
ynh_script_progression --message="Installing Python dependencies..." --weight=1
pushd $install_dir
python3 -m venv $install_dir/virtualenv
source $install_dir/virtualenv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
ynh_exec_warn_less pip install wheel toml
# Workaround for error AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
ynh_replace_string --match_string="pyOpenSSL~=20.0.1" --replace_string="pyOpenSSL~=21.0.0" --target_file="$install_dir/api/requirements/base.txt"
ynh_exec_warn_less pip install -r api/requirements.txt
python3 -m venv $install_dir/venv
source $install_dir/venv/bin/activate
ynh_exec_warn_less pip install --upgrade pip wheel toml
ynh_exec_warn_less pip install --editable ./api
popd
#=================================================
@ -102,14 +98,14 @@ popd
ynh_script_progression --message="Building funkwhale..." --weight=1
pushd $install_dir
source $install_dir/virtualenv/bin/activate
source $install_dir/venv/bin/activate
# needed for enabling the 'unaccent' extension
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER;" --database="$db_name"
ynh_exec_warn_less python api/manage.py migrate
ynh_exec_warn_less ynh_exec_as $app $install_dir/venv/bin/funkwhale-manage migrate
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH NOSUPERUSER;" --database="$db_name"
echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('$admin', '$admin_mail', 'funkwhale') " | ynh_exec_warn_less python api/manage.py shell
echo "yes" | ynh_exec_warn_less python api/manage.py collectstatic
echo "yes" | ynh_exec_warn_less ynh_exec_as $app $install_dir/venv/bin/funkwhale-manage collectstatic
popd
chmod 750 "$install_dir"

View file

@ -59,15 +59,13 @@ ynh_add_nginx_config
ynh_script_progression --message="Installing Python dependencies..." --weight=1
pushd $install_dir
ynh_secure_remove --file="$install_dir/virtualenv"
python3 -m venv $install_dir/virtualenv
source $install_dir/virtualenv/bin/activate
pip install --upgrade pip
pip install --upgrade setuptools
ynh_exec_warn_less pip install wheel toml
# Workaround for error AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
ynh_replace_string --match_string="pyOpenSSL~=20.0.1" --replace_string="pyOpenSSL~=21.0.0" --target_file="$install_dir/api/requirements/base.txt"
ynh_exec_warn_less pip install -r api/requirements.txt
ynh_secure_remove --file="$install_dir/virtualenv"
ynh_secure_remove --file="$install_dir/venv"
python3 -m venv $install_dir/venv
source $install_dir/venv/bin/activate
ynh_exec_warn_less pip install --upgrade pip wheel toml
ynh_exec_warn_less pip install --editable ./api
popd
#=================================================
@ -86,13 +84,13 @@ chown $app:$app "$install_dir/config/.env"
ynh_script_progression --message="Upgrading Funkwhale..." --weight=1
pushd $install_dir
source $install_dir/virtualenv/bin/activate
source $install_dir/venv/bin/activate
echo "yes" | ynh_exec_warn_less python api/manage.py collectstatic --clear --noinput
echo "yes" | ynh_exec_warn_less $install_dir/venv/bin/funkwhale-manage collectstatic --clear --noinput
# needed for enabling the 'unaccent' extension
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER;" --database="$db_name"
ynh_exec_warn_less python api/manage.py migrate
ynh_exec_warn_less ynh_exec_as $app $install_dir/venv/bin/funkwhale-manage migrate
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH NOSUPERUSER;" --database="$db_name"
popd

View file

@ -4,5 +4,6 @@ test_format = 1.0
exclude = ["install.nourl"]
test_upgrade_from.7a50028.name = "Upgrade from 1.2.9"
test_upgrade_from.7a50028.name = "1.2.9"
test_upgrade_from.ae7b6c5.name = "1.2.10"