mirror of
https://github.com/YunoHost-Apps/outline_ynh.git
synced 2024-09-03 19:56:12 +02:00
db_pwd
This commit is contained in:
parent
210048ed0a
commit
ce4db6a14b
4 changed files with 5 additions and 7 deletions
|
@ -10,7 +10,7 @@ UTILS_SECRET=__UTILS_SECRET__
|
|||
|
||||
# For production point these at your databases, in development the default
|
||||
# should work out of the box.
|
||||
DATABASE_URL=postgres://__DB_NAME__:__SECRET_KEY__@localhost:5432/__DB_NAME__
|
||||
DATABASE_URL=postgres://__DB_NAME__:__DB_PWD__@localhost:5432/__DB_NAME__
|
||||
DATABASE_URL_TEST=postgres://user:pass@localhost:5532/outline-test
|
||||
# Uncomment this to disable SSL for connecting to Postgres
|
||||
PGSSLMODE=disable
|
||||
|
|
|
@ -38,7 +38,6 @@ else
|
|||
echo "English"
|
||||
fi
|
||||
|
||||
secret_key=$(ynh_hex_32_random)
|
||||
utils_secret=$(ynh_hex_32_random)
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
@ -93,7 +92,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
|||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||
ynh_app_setting_set --app=$app --key=utils_secret --value=$utils_secret
|
||||
ynh_app_setting_set --app=$app --key=language_key --value=$language_key
|
||||
ynh_app_setting_set --app=$app --key=dex_app --value=$dex_app
|
||||
|
@ -146,7 +144,7 @@ ynh_script_progression --message="Creating a PostgreSQL database..." --weight=1
|
|||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$secret_key
|
||||
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
|
||||
|
||||
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS unaccent;" --database=$db_name
|
||||
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
|
||||
|
|
|
@ -34,7 +34,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path_url)
|
|||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
language_key=$(ynh_app_setting_get --app=$app --key=language_key)
|
||||
secret_key=$(ynh_app_setting_get --app=$app --key=secret_key)
|
||||
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
|
||||
dex_app=$(ynh_app_setting_get --app=$app --key=dex_app)
|
||||
dex_domain=$(ynh_app_setting_get --app=$app --key=dex_domain)
|
||||
|
@ -45,6 +44,7 @@ oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback)
|
|||
dex_auth_uri=$(ynh_app_setting_get --app=$app --key=dex_auth_uri)
|
||||
dex_token_uri=$(ynh_app_setting_get --app=$app --key=dex_token_uri)
|
||||
dex_user_uri=$(ynh_app_setting_get --app=$app --key=dex_user_uri)
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -128,7 +128,7 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st
|
|||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
|
||||
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$secret_key
|
||||
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -22,7 +22,6 @@ path_url=$(ynh_app_setting_get --app=$app --key=path_url)
|
|||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
language_key=$(ynh_app_setting_get --app=$app --key=language_key)
|
||||
secret_key=$(ynh_app_setting_get --app=$app --key=secret_key)
|
||||
utils_secret=$(ynh_app_setting_get --app=$app --key=utils_secret)
|
||||
dex_app=$(ynh_app_setting_get --app=$app --key=dex_app)
|
||||
dex_domain=$(ynh_app_setting_get --app=$app --key=dex_domain)
|
||||
|
@ -33,6 +32,7 @@ oidc_callback=$(ynh_app_setting_get --app=$app --key=oidc_callback)
|
|||
dex_auth_uri=$(ynh_app_setting_get --app=$app --key=dex_auth_uri)
|
||||
dex_token_uri=$(ynh_app_setting_get --app=$app --key=dex_token_uri)
|
||||
dex_user_uri=$(ynh_app_setting_get --app=$app --key=dex_user_uri)
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
|
Loading…
Add table
Reference in a new issue