mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
fix
This commit is contained in:
parent
1ae417874b
commit
4d42aaed06
2 changed files with 8 additions and 12 deletions
|
@ -71,7 +71,7 @@ ram.runtime = "50M"
|
|||
main.url = "/"
|
||||
|
||||
[resources.apt]
|
||||
packages = "build-essential curl ffmpeg libjpeg-dev libmagic-dev libpq-dev postgresql postgresql-client 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"
|
||||
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"
|
||||
|
|
|
@ -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
|
||||
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"
|
||||
|
|
Loading…
Add table
Reference in a new issue