YunoHost-Apps / my_webapp_ynh

Custom Web app with SFTP access
GNU General Public License v3.0
48 stars 42 forks source link

Possibilité de configurer la BDD #53

Closed jc-fgt closed 2 years ago

jc-fgt commented 3 years ago

Bonjour, En tant qu'utilisateur de Yunohost, je souhaite pouvoir paramétrer la création de la base de données à l'installation du composant Custom_Webapp.

db_name user password

tituspijean commented 2 years ago

Tu peux "tricher" en clonant le repo et modifiant ce fichier:

https://github.com/YunoHost-Apps/my_webapp_ynh/blob/testing/scripts/install#L81-L83

git clone https://github.com/YunoHost-Apps/my_webapp_ynh
cd my_webapp
nano +81 script/install

Modifie ces lignes ainsi:

db_name=TON_DB_NAME
db_pwd=TON_DB_PWD
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd

et installe l'app: yunohost app install . --force

jc-fgt commented 2 years ago

Ok merci pour ce retour :)

tituspijean commented 2 years ago

(et désolé pour la réponse très tardive ^^)