mirror of
https://github.com/YunoHost-Apps/jupyterlab_ynh.git
synced 2024-09-03 19:26:35 +02:00
fix
This commit is contained in:
parent
9c0341d0b6
commit
83da713cf0
5 changed files with 17 additions and 10 deletions
|
@ -171,7 +171,7 @@ c.JupyterHub.bind_url = 'http://:__PORT____PATH__'
|
||||||
#c.JupyterHub.cookie_secret_file = 'jupyterhub_cookie_secret'
|
#c.JupyterHub.cookie_secret_file = 'jupyterhub_cookie_secret'
|
||||||
|
|
||||||
## The location of jupyterhub data files (e.g. /usr/local/share/jupyterhub)
|
## The location of jupyterhub data files (e.g. /usr/local/share/jupyterhub)
|
||||||
c.JupyterHub.data_files_path = '__FINAL_PATH__/.venv/share/jupyterhub'
|
c.JupyterHub.data_files_path = '__INSTALL_DIR__/.venv/share/jupyterhub'
|
||||||
|
|
||||||
## Include any kwargs to pass to the database connection. See
|
## Include any kwargs to pass to the database connection. See
|
||||||
# sqlalchemy.create_engine for details.
|
# sqlalchemy.create_engine for details.
|
||||||
|
@ -589,7 +589,7 @@ c.JupyterHub.spawner_class = 'sudospawner.SudoSpawner'
|
||||||
# Some spawners allow shell-style expansion here, allowing you to use
|
# Some spawners allow shell-style expansion here, allowing you to use
|
||||||
# environment variables here. Most, including the default, do not. Consult the
|
# environment variables here. Most, including the default, do not. Consult the
|
||||||
# documentation for your spawner to verify!
|
# documentation for your spawner to verify!
|
||||||
c.Spawner.args = ['--config=__FINAL_PATH__/config/jupyter_notebook_config.py']
|
c.Spawner.args = ['--config=__INSTALL_DIR__/config/jupyter_notebook_config.py']
|
||||||
|
|
||||||
## An optional hook function that you can implement to pass `auth_state` to the
|
## An optional hook function that you can implement to pass `auth_state` to the
|
||||||
# spawner after it has been initialized but before it starts. The `auth_state`
|
# spawner after it has been initialized but before it starts. The `auth_state`
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
proxy_pass http://localhost:__PORT__;
|
proxy_pass http://localhost:__PORT__;
|
||||||
|
|
|
@ -6,7 +6,7 @@ source /usr/share/yunohost/helpers
|
||||||
app="${0//.\/50-}"
|
app="${0//.\/50-}"
|
||||||
user=$1
|
user=$1
|
||||||
|
|
||||||
final_path="$(ynh_app_setting_get --app=$app --key=final_path)"
|
install_dir="$(ynh_app_setting_get --app=$app --key=install_dir)"
|
||||||
enable_extensions="$(ynh_app_setting_get --app=$app --key=enable_extensions)"
|
enable_extensions="$(ynh_app_setting_get --app=$app --key=enable_extensions)"
|
||||||
|
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
|
@ -14,5 +14,5 @@ ynh_use_nodejs
|
||||||
if [ $enable_extensions -eq 1 ]; then
|
if [ $enable_extensions -eq 1 ]; then
|
||||||
export JUPYTERLAB_DIR="$(getent passwd $user | cut -d: -f6)/.local/share/$app/lab"
|
export JUPYTERLAB_DIR="$(getent passwd $user | cut -d: -f6)/.local/share/$app/lab"
|
||||||
node_path="$nodejs_path:$(sudo -u $user sh -c 'echo $PATH')"
|
node_path="$nodejs_path:$(sudo -u $user sh -c 'echo $PATH')"
|
||||||
sudo -u $user env "PATH=$node_path:$PATH" "$final_path/.venv/bin/jupyter" lab build --app-dir="$JUPYTERLAB_DIR"
|
sudo -u $user env "PATH=$node_path:$PATH" "$install_dir/.venv/bin/jupyter" lab build --app-dir="$JUPYTERLAB_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -29,16 +29,13 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
[install.domain]
|
[install.domain]
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "domain"
|
type = "domain"
|
||||||
|
|
||||||
[install.path]
|
[install.path]
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "path"
|
type = "path"
|
||||||
default = "/jupyterlab"
|
default = "/jupyterlab"
|
||||||
|
|
||||||
[install.admin]
|
[install.admin]
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "user"
|
type = "user"
|
||||||
|
|
||||||
[install.init_main_permission]
|
[install.init_main_permission]
|
||||||
|
@ -58,9 +55,21 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
|
||||||
default = true
|
default = true
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
|
[resources.ports]
|
||||||
|
main.default = 8080
|
||||||
|
hub.default = 8081
|
||||||
|
http_proxy.default = 8082
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
||||||
|
[resources.apt]
|
||||||
|
packages = "python3-dev python3-pip"
|
||||||
|
|
||||||
|
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
|
||||||
|
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
|
||||||
|
extras.yarn.packages = "yarn"
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# dependencies used by the app
|
|
||||||
#REMOVEME? pkg_dependencies="python3-dev python3-pip libffi-dev libzmq3-dev"
|
|
||||||
|
|
||||||
nodejs_version="16"
|
nodejs_version="16"
|
||||||
|
|
||||||
jupyterlab_version="3.2.5"
|
jupyterlab_version="3.2.5"
|
||||||
|
|
Loading…
Add table
Reference in a new issue