1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jupyterlab_ynh.git synced 2024-09-03 19:26:35 +02:00
This commit is contained in:
ericgaspar 2021-12-09 19:10:09 +01:00
parent 3e67796a2a
commit 67a478a989
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 19 additions and 20 deletions

View file

@ -14,7 +14,7 @@
"email": "pierre@kayou.io" "email": "pierre@kayou.io"
}, },
"requirements": { "requirements": {
"yunohost": ">= 4.1.7" "yunohost": ">= 4.3.0"
}, },
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
@ -24,8 +24,7 @@
"install": [ "install": [
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain"
"example": "example.com"
}, },
{ {
"name": "path", "name": "path",
@ -35,8 +34,7 @@
}, },
{ {
"name": "admin", "name": "admin",
"type": "user", "type": "user"
"example": "johndoe"
}, },
{ {
"name": "is_public", "name": "is_public",

View file

@ -9,7 +9,7 @@ pkg_dependencies="python3-dev python3-pip libffi-dev libzmq3-dev"
nodejs_version="15" nodejs_version="15"
jupyterlab_version="3.1.11" jupyterlab_version="3.2.4"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -81,6 +81,14 @@ python3 -m pip install pipenv
npm install -g configurable-http-proxy npm install -g configurable-http-proxy
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -104,14 +112,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..." --weight=1
# Create a system user
ynh_system_user_create --username=$app
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================
@ -143,8 +143,12 @@ ynh_add_config --template="../conf/jupyter_notebook_config.py" --destination="$f
#================================================= #=================================================
# Set permissions to app files # Set permissions to app files
chown -R root: $final_path/ #chown -R root: $final_path/
chown -R $admin: $final_path/.venv/ #chown -R $admin: $final_path/.venv/
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#================================================= #=================================================
# ADVERTISE SERVICE IN ADMIN PANEL # ADVERTISE SERVICE IN ADMIN PANEL

View file

@ -37,10 +37,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#================================================= #=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=1 ynh_script_progression --message="Validating restoration parameters..." --weight=1
ynh_webpath_available --domain=$domain --path_url=$path_url \ test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS