1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/fittrackee_ynh.git synced 2024-09-03 18:36:16 +02:00

Merge branch 'YunoHost-Apps:testing' into testing

This commit is contained in:
oufmilo 2023-01-02 20:47:33 +01:00 committed by GitHub
commit a64a228ae3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View file

@ -32,7 +32,7 @@ admin=$YNH_APP_ARG_ADMIN
app=$YNH_APP_INSTANCE_NAME
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
admin_mail=$(ynh_user_get_info --username=$admin --key=username)
#=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS

View file

@ -22,8 +22,12 @@ language=$(ynh_app_setting_get --app=$app --key=language)
admin=$(ynh_app_setting_get --app=$app --key=admin)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$(ynh_app_setting_get --app=$app --key=db_user)
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
port=$(ynh_app_setting_get --app=$app --key=port)
admin_mail=$(ynh_user_get_info --username=$admin --key=username)
#=================================================
# CHECK VERSION
#=================================================
@ -134,6 +138,23 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES
#=================================================
ynh_script_progression --message="Installing service script..." --weight=1
ynh_add_config --template="../conf/.env.production" --destination="$final_path/.env"
chmod 600 $final_path/.env
chown $app:www-data "$final_path/.env"
set -a; source "$final_path/.env"; set +a
ynh_secure_remove --file="$final_path/venv"
mkdir "$final_path/venv"
python3 -m venv "$final_path/venv"
$final_path/venv/bin/pip3 install -r "$final_path/requirements.txt"
#=================================================
# NGINX CONFIGURATION
#=================================================