mirror of
https://github.com/YunoHost-Apps/my_capsule_ynh.git
synced 2024-09-03 19:46:21 +02:00
Always install the database
This commit is contained in:
parent
adc73f4aec
commit
ae027a40c3
6 changed files with 13 additions and 41 deletions
|
@ -1,4 +0,0 @@
|
|||
# MySQL Database
|
||||
name: __DB_NAME__
|
||||
user: __DB_USER__
|
||||
pass: __DB_PWD__
|
|
@ -1,8 +1,12 @@
|
|||
* Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside.
|
||||
* providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
* It can also create a MySQL database which will be backed up and restored with your application. The connection details will be stored in the file `db_accesss.txt` located in the root directory.
|
||||
|
||||
* MySQL database information:
|
||||
* name: __DB_NAME__
|
||||
* user: __DB_USER__
|
||||
* pass: __DB_PWD__
|
||||
|
||||
* SFTP port
|
||||
You may have change the SSH port as described in this section:
|
||||
[Modify the SSH port](https://yunohost.org/en/security#modify-the-ssh-port);
|
||||
then you should use this port to update your website with SFTP.
|
||||
then you should use this port to update your website with SFTP.
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
* Une fois installé, allez à l'URL choisie pour connaître l'utilisateur, le domaine et le port que vous devrez utiliser pour l'accès SFTP ** Le mot de passe est celui que vous avez choisi lors de l'installation. Sous le répertoire Web, vous verrez un dossier `www` qui contient les fichiers publics servis par cette application. Vous pouvez y mettre tous les fichiers de votre application Web personnalisée.
|
||||
* L'application peut aussi créer une base de données MySQL, permettant l'accès aux fichiers par [SFTP] (https://yunohost.org/en/filezilla).
|
||||
* Il peut également créer une base de données MySQL qui sera sauvegardée et restaurée avec votre application. Les détails de connexion seront stockés dans le fichier `db_accesss.txt` situé dans le répertoire racine.
|
||||
|
||||
* Informations de connexion à la base de données MySQL:
|
||||
* name: __DB_NAME__
|
||||
* user: __DB_USER__
|
||||
* pass: __DB_PWD__
|
||||
|
||||
* Port SFTP
|
||||
Vous pouvez modifier le port SSH comme décrit dans cette section :
|
||||
|
|
|
@ -58,12 +58,6 @@ ram.runtime = "50M"
|
|||
type = "boolean"
|
||||
default = true
|
||||
|
||||
[install.with_mysql]
|
||||
ask.en = "Do you need a MySQL database?"
|
||||
ask.fr = "Avez-vous besoin d'une base de données MySQL ?"
|
||||
type = "boolean"
|
||||
default = false
|
||||
|
||||
[resources]
|
||||
[resources.sources.main]
|
||||
url = "https://tildegit.org/sbgodin/HtmGem/archive/v1.4.1.tar.gz"
|
||||
|
@ -81,13 +75,9 @@ ram.runtime = "50M"
|
|||
packages = [
|
||||
"php8.2-fpm",
|
||||
"php8.2-mbstring",
|
||||
"mariadb-server",
|
||||
"php8.2-mysql"
|
||||
]
|
||||
packages_from_raw_bash = """
|
||||
if [[ "$database" == true ]]; then
|
||||
echo "mariadb-server, php8.2-mysql"
|
||||
fi
|
||||
"""
|
||||
|
||||
[resources.database]
|
||||
# Might not be used, but it's easier to handle it here
|
||||
type = "mysql"
|
||||
|
|
|
@ -50,17 +50,6 @@ setfacl -m g:"$app":r-x "$install_dir"
|
|||
setfacl -m g:"www-data":r-x "$install_dir"
|
||||
setfacl -m g:"gemserv":r-x "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
if [ "$with_mysql" -eq 1 ]; then
|
||||
ynh_add_config --template="db_access.txt" --destination="$install_dir/db_access.txt"
|
||||
chown "$app:www-data" "$install_dir/db_access.txt"
|
||||
chmod 440 "$install_dir/db_access.txt"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
|
|
|
@ -45,17 +45,6 @@ setfacl -m g:"$app":r-x "$install_dir"
|
|||
setfacl -m g:"www-data":r-x "$install_dir"
|
||||
setfacl -m g:"gemserv":r-x "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
if [ "$with_mysql" -eq 1 ]; then
|
||||
ynh_add_config --template="db_access.txt" --destination="$install_dir/db_access.txt"
|
||||
chown "$app:www-data" "$install_dir/db_access.txt"
|
||||
chmod 440 "$install_dir/db_access.txt"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue