diff --git a/conf/config.json b/conf/config.json index c7b47d7..b8fda0a 100644 --- a/conf/config.json +++ b/conf/config.json @@ -143,8 +143,8 @@ "IosMinVersion": "" }, "SqlSettings": { - "DriverName": "postgres", - "DataSource": "postgres://__DB_USER__:__DB_PASS__@localhost:5432/__DB_NAME__?sslmode=disable&connect_timeout=10", + "DriverName": "mysql", + "DataSource": "mysql://mmuser:__DB_PASS__@tcp(localhost:3306)/__DB_NAME__?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s", "DataSourceReplicas": [], "DataSourceSearchReplicas": [], "MaxIdleConns": 20, diff --git a/scripts/install b/scripts/install index ebe67cb..c1f7b2d 100644 --- a/scripts/install +++ b/scripts/install @@ -80,7 +80,7 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= # CREATE A MYSQL DATABASE #================================================= -ynh_script_progression --message="Creating a PostgreSQL database..." --weight=10 +ynh_script_progression --message="Creating a MySQL database..." --weight=10 db_name=$(ynh_sanitize_dbid --db_name=$app) db_user=mmuser @@ -90,8 +90,7 @@ ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_app_setting_set --app=$app --key=db_user --value=$db_user ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd -ynh_psql_test_if_first_run -ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd #================================================= # CREATE DEDICATED USER @@ -126,7 +125,6 @@ cp ../conf/config.json $final_path/config/config.json ynh_replace_string --match_string="__URL__" --replace_string="https://$domain$path_url" --target_file="$final_path/config/config.json" ynh_replace_string --match_string="__PORT__" --replace_string="127.0.0.1:$port" --target_file="$final_path/config/config.json" ynh_replace_string --match_string="__DB_NAME__" --replace_string=$db_name --target_file="$final_path/config/config.json" -ynh_replace_string --match_string="__DB_USER__" --replace_string=$db_user --target_file="$final_path/config/config.json" ynh_replace_string --match_string="__DB_PASS__" --replace_string=$db_pwd --target_file="$final_path/config/config.json" ynh_replace_string --match_string="__DATA__" --replace_string=$data_path --target_file="$final_path/config/config.json"