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__'
|
||||
|
||||
# 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"
|
||||
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.system_user]
|
||||
allow_sftp = true
|
||||
allow_ssh = false
|
||||
home = "/home/yunohost.app/__APP__"
|
||||
# This will provision/deprovision a unix system user
|
||||
|
||||
[resources.install_dir]
|
||||
|
@ -46,6 +54,7 @@ ram.runtime = "50M"
|
|||
[resources.data_dir]
|
||||
# This will create/remove the data dir as /home/yunohost.app/$app
|
||||
# and store the corresponding setting $data_dir
|
||||
dir = "/home/yunohost.app/__APP__"
|
||||
|
||||
[resources.permissions]
|
||||
# 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"
|
||||
ynh_add_config --template="__init__.py" --destination="$data_dir/FastAPIAppFolder/__init__.py"
|
||||
|
||||
# Add the password to this user
|
||||
chpasswd <<< "${app}:${password}"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue