1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00
This commit is contained in:
ericgaspar 2021-06-03 14:32:12 +02:00
parent d9f25d3048
commit 61697b2749
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 8 additions and 10 deletions

View file

@ -32,7 +32,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
# Add settings here as needed by your application
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
unicorn_workers=$(ynh_app_setting_get --app=$app --key=unicorn_workers)
#=================================================

View file

@ -63,7 +63,7 @@ ynh_app_setting_set --app=$app --key=email --value=$email
#=================================================
ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE A POSTGRESQL DATABASE
@ -72,7 +72,7 @@ ynh_script_progression --message="Creating a PostgreSQL database..."
db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
db_pwd=$(ynh_string_random)
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd
ynh_psql_test_if_first_run
@ -159,10 +159,8 @@ echo "svgo: false" > $final_path/.image_optim.yml
ynh_script_progression --message="Setting up Unicorn..."
# Set a secret value
cp ../conf/secrets.yml "$final_path/config/secrets.yml"
ynh_replace_string --match_string="__SECRET__" --replace_string="$(ynh_string_random)" --target_file="$final_path/config/secrets.yml"
# Calculate and store the config file checksum
ynh_store_file_checksum --file="$final_path/config/secrets.yml"
secret=$(ynh_string_random)
ynh_add_config --template="../conf/secrets.yml" --destination="$final_path/config/secrets.yml"
# Set permissions to app files
chown -R $app: $final_path
@ -334,7 +332,7 @@ fi
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading nginx web server..."
ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload

View file

@ -21,13 +21,13 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
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_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
redis_db=$(ynh_app_setting_get --app=$app --key=redis_db)
unicorn_workers=$(ynh_app_setting_get --app=$app --key=unicorn_workers)
email=$(ynh_app_setting_get --app=$app --key=email)
# Check memory requirements
check_memory_requirements_upgrade
#check_memory_requirements_upgrade
#=================================================
# CHECK VERSION