mirror of
https://github.com/YunoHost-Apps/jupyterlab_ynh.git
synced 2024-09-03 19:26:35 +02:00
commit
5856a663f2
9 changed files with 59 additions and 25 deletions
|
@ -1,7 +1,7 @@
|
|||
# JupyterLab for YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/jupyterlab.svg)](https://dash.yunohost.org/appci/app/jupyterlab) ![](https://ci-apps.yunohost.org/ci/badges/jupyterlab.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jupyterlab.maintain.svg)
|
||||
[![Install JupyterLab with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jupyterlab)
|
||||
[![Install JupyterLab with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=jupyterlab)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
|
@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
|||
## Overview
|
||||
JupyterLab is the next-generation user interface for Project Jupyter offering all the familiar building blocks of the classic Jupyter Notebook (notebook, terminal, text editor, file browser, rich outputs, etc.) in a flexible and powerful user interface. JupyterLab will eventually replace the classic Jupyter Notebook.
|
||||
|
||||
**Shipped version:** 2.2.8
|
||||
**Shipped version:** 3.0.1
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
@ -51,8 +51,7 @@ How to configure this app: by an admin panel, a plain file with SSH.
|
|||
|
||||
---
|
||||
|
||||
Developers info
|
||||
----------------
|
||||
## Developers info
|
||||
|
||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/jupyterlab_ynh/tree/testing).
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# JupyterLab pour YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/jupyterlab.svg)](https://dash.yunohost.org/appci/app/jupyterlab) ![](https://ci-apps.yunohost.org/ci/badges/jupyterlab.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jupyterlab.maintain.svg)
|
||||
[![Installer JupyterLab avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jupyterlab)
|
||||
[![Installer JupyterLab avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=jupyterlab)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
|
@ -11,7 +11,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
|||
## Vue d’ensemble
|
||||
JupyterLab est une interface utilisateur de nouvelle génération pour le projet Jupyter offrant tous les modules de Jupyter Notebook (interpréteur Python, terminal, éditeur de texte, navigateur de fichiers, etc.) dans une interface utilisateur flexible et puissante. JupyterLab remplacera à terme Jupyter Notebook.
|
||||
|
||||
**Version incluse :** 2.2.8
|
||||
**Version incluse :** 3.0.1
|
||||
|
||||
## Captures d’écran
|
||||
|
||||
|
@ -51,8 +51,7 @@ Comment configurer cette application : via le panneau d'administration, un fichi
|
|||
|
||||
---
|
||||
|
||||
Informations pour les développeurs
|
||||
----------------
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/jupyterlab_ynh/tree/testing).
|
||||
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
multi_instance=1
|
||||
port_already_use=1
|
||||
change_url=1
|
||||
;;; Levels
|
||||
Level 5=auto
|
||||
;;; Options
|
||||
Email=
|
||||
Notification=none
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Code console environment for running Python code interactively.",
|
||||
"fr": "Console de code pour exécuter du code Python de manière interactive."
|
||||
},
|
||||
"version": "2.2.8~ynh1",
|
||||
"version": "3.0.1~ynh1",
|
||||
"url": "https://jupyterlab.readthedocs.io/en/stable/",
|
||||
"license": "BSD-3-Clause",
|
||||
"maintainer": {
|
||||
|
@ -14,7 +14,7 @@
|
|||
"email": "pierre@kayou.io"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.5"
|
||||
"yunohost": ">= 3.8.1"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
# dependencies used by the app
|
||||
pkg_dependencies="python3-dev python3-pip libffi-dev libzmq3-dev"
|
||||
|
||||
nodejs_version="12"
|
||||
nodejs_version="14"
|
||||
|
||||
jupyterlab_version="2.2.8"
|
||||
jupyterlab_version="3.0.1"
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -109,6 +109,14 @@ ynh_script_progression --message="Configuring nginx web server..." --weight=1
|
|||
# Create a dedicated 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
|
||||
#=================================================
|
||||
|
@ -165,7 +173,7 @@ chown -R $admin: $final_path/.venv/
|
|||
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||
#=================================================
|
||||
|
||||
yunohost service add $app --description "$app daemon" --log_type "systemd" --log "$app"
|
||||
yunohost service add $app --description="$app daemon" --log="$app"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
|
@ -91,6 +91,14 @@ then
|
|||
ynh_exec_warn_less yunohost firewall disallow TCP $port_http_proxy
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing the dedicated system user..." --weight=1
|
||||
|
||||
# Delete a system user
|
||||
ynh_system_user_delete --username=$app
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -23,7 +23,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..."
|
||||
ynh_script_progression --message="Loading settings..." --weight=1
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -35,7 +35,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
ynh_script_progression --message="Validating restoration parameters..." --weight=1
|
||||
|
||||
ynh_webpath_available --domain=$domain --path_url=$path_url \
|
||||
|| ynh_die --message="Path not available: ${domain}${path_url}"
|
||||
|
@ -53,10 +53,18 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..."
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=5
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
|
@ -84,21 +92,21 @@ npm install -g configurable-http-proxy
|
|||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the systemd configuration..."
|
||||
ynh_script_progression --message="Restoring the systemd configuration..." --weight=2
|
||||
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
#=================================================
|
||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||
#=================================================
|
||||
|
||||
yunohost service add $app --description "$app daemon" --log_type "systemd" --log "$app"
|
||||
yunohost service add $app --description="$app daemon" --log="$app"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..."
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=5
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --line_match="JupyterHub is now running at" --log_path="systemd"
|
||||
|
||||
|
@ -107,7 +115,7 @@ ynh_systemd_action --service_name=$app --action="start" --line_match="JupyterHub
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading nginx web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -76,18 +76,26 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..."
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=2
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading nginx web server configuration..."
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -171,6 +179,12 @@ ynh_add_systemd_config
|
|||
chown -R root: $final_path/
|
||||
chown -R $admin: $final_path/.venv/
|
||||
|
||||
#=================================================
|
||||
# ADVERTISE SERVICE IN ADMIN PANEL
|
||||
#=================================================
|
||||
|
||||
yunohost service add $app --description="$app daemon" --log="$app"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue