mirror of
https://github.com/YunoHost-Apps/FastAPI_ynh.git
synced 2024-09-03 18:36:00 +02:00
ajout d'une option pour pouvoir uploadé du code au bon endroit via sFTP
This commit is contained in:
parent
0696476457
commit
18c4f2d254
3 changed files with 14 additions and 2 deletions
|
@ -17,4 +17,4 @@ accesslog = '__LOG_FILE__'
|
||||||
errorlog = '__LOG_FILE__'
|
errorlog = '__LOG_FILE__'
|
||||||
|
|
||||||
# https://docs.gunicorn.org/en/latest/settings.html#pidfile
|
# https://docs.gunicorn.org/en/latest/settings.html#pidfile
|
||||||
pidfile = '__DATA_DIR__/gunicorn.pid' # /home/yunohost.app/$app/gunicorn.pid
|
pidfile = '__INSTALL_DIR__/gunicorn.pid'
|
||||||
|
|
|
@ -37,8 +37,16 @@ ram.runtime = "50M"
|
||||||
type = "group"
|
type = "group"
|
||||||
default = "visitors"
|
default = "visitors"
|
||||||
|
|
||||||
|
[install.password]
|
||||||
|
ask.en = "Password that you will need to upload your code on YunoHost"
|
||||||
|
ask.fr = "Le mot de passe que vous utiliserez pour téléverser votre code sur Yunohost"
|
||||||
|
type = "password"
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
allow_sftp = true
|
||||||
|
allow_ssh = false
|
||||||
|
home = "/home/yunohost.app/__APP__"
|
||||||
# This will provision/deprovision a unix system user
|
# This will provision/deprovision a unix system user
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
@ -46,6 +54,7 @@ ram.runtime = "50M"
|
||||||
[resources.data_dir]
|
[resources.data_dir]
|
||||||
# This will create/remove the data dir as /home/yunohost.app/$app
|
# This will create/remove the data dir as /home/yunohost.app/$app
|
||||||
# and store the corresponding setting $data_dir
|
# and store the corresponding setting $data_dir
|
||||||
|
dir = "/home/yunohost.app/__APP__"
|
||||||
|
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
# This will configure SSOwat permission for $domain/$path/
|
# This will configure SSOwat permission for $domain/$path/
|
||||||
|
|
|
@ -69,6 +69,9 @@ ynh_add_config --template="gunicorn.conf.py" --destination="$install_dir/gunicor
|
||||||
mkdir -p "$data_dir/FastAPIAppFolder"
|
mkdir -p "$data_dir/FastAPIAppFolder"
|
||||||
ynh_add_config --template="__init__.py" --destination="$data_dir/FastAPIAppFolder/__init__.py"
|
ynh_add_config --template="__init__.py" --destination="$data_dir/FastAPIAppFolder/__init__.py"
|
||||||
|
|
||||||
|
# Add the password to this user
|
||||||
|
chpasswd <<< "${app}:${password}"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -100,4 +103,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="$log_file"
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Installation of $app completed" --last
|
ynh_script_progression --message="Installation of $app completed" --last
|
||||||
|
|
Loading…
Reference in a new issue