mirror of
https://github.com/YunoHost-Apps/jupyterlab_ynh.git
synced 2024-09-03 19:26:35 +02:00
Give Jupyter write access to its own files
This commit is contained in:
parent
9fad372003
commit
7eba3a9f72
2 changed files with 4 additions and 6 deletions
|
@ -16,19 +16,17 @@ jupyterlab_version="3.0.14"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
function python_setup {
|
function python_setup {
|
||||||
sudo chown -R $app: "$final_path"
|
set_permissions
|
||||||
|
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
sudo -u $app PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyterhub-ldapauthenticator pyzmq --three 2>&1
|
sudo -u $app PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyterhub-ldapauthenticator pyzmq --three 2>&1
|
||||||
sudo -u $app python3 -m pipenv run jupyterhub upgrade-db 2>&1
|
sudo -u $app python3 -m pipenv run jupyterhub upgrade-db 2>&1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
set_permissions
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_permissions {
|
function set_permissions {
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R root:$app "$final_path"
|
chown -R $app:$app "$final_path"
|
||||||
chown -R $app:$app "$final_path/.venv"
|
|
||||||
chmod -R g=u,g-w,o-rwx "$final_path"
|
chmod -R g=u,g-w,o-rwx "$final_path"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||||
|
|
||||||
final_path=/opt/$app
|
final_path=/opt/yunohost/$app
|
||||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
|
|
Loading…
Add table
Reference in a new issue