Compare commits
No commits in common. "master" and "fix-db" have entirely different histories.
27 changed files with 89 additions and 591 deletions
|
@ -1,9 +0,0 @@
|
|||
# All available README files by language
|
||||
|
||||
- [Read the README in English](README.md)
|
||||
- [Lea el README en español](README_es.md)
|
||||
- [Irakurri README euskaraz](README_eu.md)
|
||||
- [Lire le README en français](README_fr.md)
|
||||
- [Le o README en galego](README_gl.md)
|
||||
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
|
||||
- [阅读中文(简体)的 README](README_zh_Hans.md)
|
28
README.md
28
README.md
|
@ -1,46 +1,44 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# My Webapp for YunoHost
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
[](https://dash.yunohost.org/appci/app/my_webapp)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Read this README in other languages.](./ALL_README.md)*
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allows you to install My Webapp quickly and simply on a YunoHost server.*
|
||||
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
|
||||
> *This package allows you to install My Webapp quickly and simply on a YunoHost server.
|
||||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||
|
||||
## Overview
|
||||
|
||||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
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_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**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.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
|
||||
**Shipped version:** 1.0~ynh19
|
||||
**Shipped version:** 1.0~ynh15
|
||||
## Documentation and resources
|
||||
|
||||
- Upstream app code repository: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- YunoHost Store: <https://apps.yunohost.org/app/my_webapp>
|
||||
- Report a bug: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
* Upstream app code repository: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
* YunoHost documentation for this app: <https://yunohost.org/app_my_webapp>
|
||||
* Report a bug: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
||||
Please send your pull request to the [`testing` branch](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
|
||||
To try the `testing` branch, please proceed like that:
|
||||
To try the testing branch, please proceed like that.
|
||||
|
||||
```bash
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
|
|
49
README_es.md
49
README_es.md
|
@ -1,49 +0,0 @@
|
|||
<!--
|
||||
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
No se debe editar a mano.
|
||||
-->
|
||||
|
||||
# My Webapp para Yunohost
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Leer este README en otros idiomas.](./ALL_README.md)*
|
||||
|
||||
> *Este paquete le permite instalarMy Webapp rapidamente y simplement en un servidor YunoHost.*
|
||||
> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
|
||||
|
||||
## Descripción general
|
||||
|
||||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**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.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
|
||||
**Versión actual:** 1.0~ynh19
|
||||
## Documentaciones y recursos
|
||||
|
||||
- Repositorio del código fuente oficial de la aplicación : <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- Catálogo YunoHost: <https://apps.yunohost.org/app/my_webapp>
|
||||
- Reportar un error: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Información para desarrolladores
|
||||
|
||||
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing
|
||||
|
||||
Para probar la rama `testing`, sigue asÍ:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
o
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>
|
49
README_eu.md
49
README_eu.md
|
@ -1,49 +0,0 @@
|
|||
<!--
|
||||
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
|
||||
EZ editatu eskuz.
|
||||
-->
|
||||
|
||||
# My Webapp YunoHost-erako
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
|
||||
|
||||
> *Pakete honek My Webapp YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
|
||||
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
|
||||
|
||||
## Aurreikuspena
|
||||
|
||||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**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.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
|
||||
**Paketatutako bertsioa:** 1.0~ynh19
|
||||
## Dokumentazioa eta baliabideak
|
||||
|
||||
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- YunoHost Denda: <https://apps.yunohost.org/app/my_webapp>
|
||||
- Eman errore baten berri: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Garatzaileentzako informazioa
|
||||
|
||||
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
|
||||
`testing` abarra probatzeko, ondorengoa egin:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
edo
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>
|
31
README_fr.md
31
README_fr.md
|
@ -1,48 +1,47 @@
|
|||
<!--
|
||||
Nota bene : ce README est automatiquement généré par <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
Il NE doit PAS être modifié à la main.
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# My Webapp pour YunoHost
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
[](https://dash.yunohost.org/appci/app/my_webapp)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Lire le README dans d'autres langues.](./ALL_README.md)*
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d’installer My Webapp rapidement et simplement sur un serveur YunoHost.*
|
||||
> *Si vous n’avez pas YunoHost, consultez [ce guide](https://yunohost.org/install) pour savoir comment l’installer et en profiter.*
|
||||
> *Ce package vous permet d’installer My Webapp rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.*
|
||||
|
||||
## Vue d’ensemble
|
||||
|
||||
Cette application vous permet d'installer facilement une application vide personnalisée, fourni un accès aux fichiers avec [SFTP](https://yunohost.org/fr/filezilla).
|
||||
|
||||
Elle peut également créer une base de données MySQL ou PostgreSQL - 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.
|
||||
Elle 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.
|
||||
|
||||
La version de PHP-FPM peut aussi être choisie, parmi `none`, `7.4`, `8.0`, `8.1` et `8.2`.
|
||||
|
||||
**Une fois installé, rendez-vous sur 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 mettre tous les fichiers de votre application Web personnalisée à l'intérieur.
|
||||
|
||||
L'application vous permet aussi de gérer - si vous activez l'option dans le panneau de configuration - la gestion des erreurs 404, il vous suffit de créer un dossier `error` dans le répertoire racine `www` et d'y placer vos fichiers d'erreur `html`
|
||||
|
||||
**Version incluse :** 1.0~ynh19
|
||||
**Version incluse :** 1.0~ynh15
|
||||
## Documentations et ressources
|
||||
|
||||
- Dépôt de code officiel de l’app : <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- YunoHost Store : <https://apps.yunohost.org/app/my_webapp>
|
||||
- Signaler un bug : <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
* Dépôt de code officiel de l’app : <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_my_webapp>
|
||||
* Signaler un bug : <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche `testing`](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche `testing`, procédez comme suit :
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
|
||||
```bash
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
|
||||
**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
|
49
README_gl.md
49
README_gl.md
|
@ -1,49 +0,0 @@
|
|||
<!--
|
||||
NOTA: Este README foi creado automáticamente por <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
NON debe editarse manualmente.
|
||||
-->
|
||||
|
||||
# My Webapp para YunoHost
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Le este README en outros idiomas.](./ALL_README.md)*
|
||||
|
||||
> *Este paquete permíteche instalar My Webapp de xeito rápido e doado nun servidor YunoHost.*
|
||||
> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.*
|
||||
|
||||
## Vista xeral
|
||||
|
||||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**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.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
|
||||
**Versión proporcionada:** 1.0~ynh19
|
||||
## Documentación e recursos
|
||||
|
||||
- Repositorio de orixe do código: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- Tenda YunoHost: <https://apps.yunohost.org/app/my_webapp>
|
||||
- Informar dun problema: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Info de desenvolvemento
|
||||
|
||||
Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
|
||||
Para probar a rama `testing`, procede deste xeito:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Máis info sobre o empaquetado da app:** <https://yunohost.org/packaging_apps>
|
49
README_id.md
49
README_id.md
|
@ -1,49 +0,0 @@
|
|||
<!--
|
||||
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
Ini TIDAK boleh diedit dengan tangan.
|
||||
-->
|
||||
|
||||
# My Webapp untuk YunoHost
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
|
||||
|
||||
> *Paket ini memperbolehkan Anda untuk memasang My Webapp secara cepat dan mudah pada server YunoHost.*
|
||||
> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
|
||||
|
||||
## Ringkasan
|
||||
|
||||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**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.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
|
||||
**Versi terkirim:** 1.0~ynh19
|
||||
## Dokumentasi dan sumber daya
|
||||
|
||||
- Depot kode aplikasi hulu: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- Gudang YunoHost: <https://apps.yunohost.org/app/my_webapp>
|
||||
- Laporkan bug: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Info developer
|
||||
|
||||
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
|
||||
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
atau
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>
|
47
README_it.md
47
README_it.md
|
@ -1,47 +0,0 @@
|
|||
<!--
|
||||
N.B.: Questo README è stato automaticamente generato da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
NON DEVE essere modificato manualmente.
|
||||
-->
|
||||
|
||||
# My Webapp per YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/my_webapp)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Leggi questo README in altre lingue.](./ALL_README.md)*
|
||||
|
||||
> *Questo pacchetto ti permette di installare My Webapp su un server YunoHost in modo semplice e veloce.*
|
||||
> *Se non hai YunoHost, consulta [la guida](https://yunohost.org/install) per imparare a installarlo.*
|
||||
|
||||
## Panoramica
|
||||
|
||||
This application allows you to easily install a custom Web application, 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_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**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.
|
||||
|
||||
|
||||
**Versione pubblicata:** 1.0~ynh15
|
||||
## Documentazione e risorse
|
||||
|
||||
- Repository upstream del codice dell’app: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- Store di YunoHost: <https://apps.yunohost.org/app/my_webapp>
|
||||
- Segnala un problema: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Informazioni per sviluppatori
|
||||
|
||||
Si prega di inviare la tua pull request alla [branch di `testing`](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
|
||||
Per provare la branch di `testing`, si prega di procedere in questo modo:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
o
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Maggiori informazioni riguardo il pacchetto di quest’app:** <https://yunohost.org/packaging_apps>
|
|
@ -1,49 +0,0 @@
|
|||
<!--
|
||||
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
|
||||
请勿手动编辑。
|
||||
-->
|
||||
|
||||
# YunoHost 上的 My Webapp
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
|
||||
|
||||
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 My Webapp。*
|
||||
> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。*
|
||||
|
||||
## 概况
|
||||
|
||||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**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.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
|
||||
**分发版本:** 1.0~ynh19
|
||||
## 文档与资源
|
||||
|
||||
- 上游应用代码库: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- YunoHost 商店: <https://apps.yunohost.org/app/my_webapp>
|
||||
- 报告 bug: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## 开发者信息
|
||||
|
||||
请向 [`testing` 分支](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing) 发送拉取请求。
|
||||
|
||||
如要尝试 `testing` 分支,请这样操作:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
或
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>
|
|
@ -1,7 +0,0 @@
|
|||
# Build error access
|
||||
error_page 403 __PATH__/error/403.html;
|
||||
error_page 404 __PATH__/error/404.html;
|
||||
|
||||
location ^~ __PATH__/error/ {
|
||||
internal;
|
||||
}
|
|
@ -5,8 +5,8 @@ location __PATH__/ {
|
|||
alias __INSTALL_DIR__/www/;
|
||||
|
||||
# Default indexes and catch-all
|
||||
index index.php index.html;
|
||||
try_files $uri $uri/ __PATH__/index.php?$args =404;
|
||||
index index.html index.php;
|
||||
try_files $uri $uri/ __PATH__/index.php?$args;
|
||||
|
||||
# Prevent useless logs
|
||||
location = __PATH__/favicon.ico {
|
||||
|
|
|
@ -4,32 +4,19 @@ version = "1.0"
|
|||
name = "My Webapp configuration"
|
||||
|
||||
[main.sftp]
|
||||
name.en = "SFTP access"
|
||||
name.fr = "Accès SFTP"
|
||||
name = "SFTP access"
|
||||
|
||||
[main.sftp.with_sftp]
|
||||
ask.en = "Do you need a SFTP access?"
|
||||
ask.fr = "Avez-vous besoin d'un accès SFTP ?"
|
||||
ask = "Do you need a SFTP access?"
|
||||
type = "boolean"
|
||||
default = true
|
||||
|
||||
[main.sftp.password]
|
||||
ask.en = "Set a password for the SFTP access"
|
||||
ask.fr = "Définir un mot de passe pour l’accès SFTP"
|
||||
ask = "Set a password for the SFTP access"
|
||||
type = "password"
|
||||
optional = true
|
||||
visible = "with_sftp"
|
||||
help.en = "If a password already exist, leave blank and it will not be replaced."
|
||||
help.fr = "Si un mot de passe existe déjà, laissez vide et il ne sera pas remplacé."
|
||||
|
||||
[main.code_error]
|
||||
name = "Html Custom error"
|
||||
|
||||
[main.code_error.custom_error_file]
|
||||
ask = "Activate the custom error file use"
|
||||
type = "boolean"
|
||||
default = false
|
||||
help = "Once custom error enabled, you can add/create a custom `404.html` file in a directory `www\\error`."
|
||||
help = "If a password already exist, leave blank and it will not be replaced."
|
||||
|
||||
[main.php_fpm_config]
|
||||
name = "PHP-FPM configuration"
|
||||
|
@ -37,7 +24,7 @@ name = "My Webapp configuration"
|
|||
[main.php_fpm_config.phpversion]
|
||||
ask = "PHP version"
|
||||
type = "select"
|
||||
choices = ["none", "7.4", "8.0", "8.1", "8.2", "8.3"]
|
||||
choices = ["none", "7.4", "8.0", "8.1", "8.2"]
|
||||
default = "none"
|
||||
|
||||
[main.php_fpm_config.fpm_footprint]
|
||||
|
|
17
doc/ADMIN.md
17
doc/ADMIN.md
|
@ -11,24 +11,13 @@ Once installed, go to the chosen URL to know the username, domain and port you w
|
|||
|
||||
To connect, you'll need an SFTP app such as [Filezilla](https://filezilla-project.org/) for Windows, Mac or Linux. You can also use your default file manager on [Mac](https://support.apple.com/guide/mac-help/connect-mac-shared-computers-servers-mchlp1140/mac) or Linux.
|
||||
|
||||
#### Forgot your SFTP password?
|
||||
|
||||
If you forgot your SFTP password, you can change it in YunoHost's webadmin interface in `Apps > My webapp > My Webapp configuration`.
|
||||
You can also check there that SFTP is enabled.
|
||||
|
||||
### Login using the command line
|
||||
|
||||
Starting YunoHost v11.1.21, you can run `sudo yunohost app shell __APP__` in the command line interface to log in as your app user.
|
||||
|
||||
The `php` command will point to the PHP version installed for the app.
|
||||
|
||||
### Adding or editing files
|
||||
|
||||
Once logged in, 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.
|
||||
Once logged in SFTP, 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.
|
||||
|
||||
### 403 and 404 error handling
|
||||
### Forgot your SFTP password?
|
||||
|
||||
The web server configuration supports http error handling `403` and `404` (access denied and resource not found). Create an `error` folder at `__INSTALL_DIR__/www/error`, and put your `403.html` and `404.html` files in there.
|
||||
If you forgot your SFTP password, you can change it in YunoHost's webadmin interface in `Apps > My webapp > My Webapp configuration`.
|
||||
|
||||
### Customizing the nginx configuration
|
||||
|
||||
|
|
|
@ -9,26 +9,19 @@ Une fois installée, rendez-vous sur l'URL choisie pour connaître le nom d'util
|
|||
- Mot de passe: mot de passe défini lors de l'installation
|
||||
- Port: 22 (à moins que vous ayez changé le port SSH)
|
||||
|
||||
Pour vous connecter, vous devrez utiliser une application SFTP tel que [Filezilla](https://filezilla-project.org/) pour Windows, Mac ou Linux. Vous pouvez aussi directement utiliser votre gestionnaire de fichiers sous Linux ou [Mac](https://support.apple.com/guide/mac-help/connect-mac-shared-computers-servers-mchlp1140/mac).
|
||||
|
||||
#### Oubli du mot de passe SFTP
|
||||
|
||||
Si vous avez oublié votre mot de passe SFTP, vous pouvez le changer dans la webadmin de Yunohost dans `Applications > Votre webapp > My Webapp configuration`.
|
||||
Vous pourrez aussi vérifier que SFTP est activé pour votre app.
|
||||
|
||||
### Connexion par le terminal
|
||||
|
||||
A partir de YunoHost v11.1.21, vous pouvez lancer `sudo yunohost app shell __APP__` dans un terminal pour vous connecter en tant que l'utilisateur gérant l'app.
|
||||
|
||||
La commande `php` pointera vers la version de PHP installée pour l'app.
|
||||
Pour vous connectez, vous devrez utiliser une application SFTP tel que [Filezilla](https://filezilla-project.org/) pour Windows, Mac ou Linux. Vous pouvez aussi directement utiliser votre gestionnaire de fichiers sous Linux ou [Mac](https://support.apple.com/guide/mac-help/connect-mac-shared-computers-servers-mchlp1140/mac).
|
||||
|
||||
### Ajouter ou modifier les fichiers
|
||||
|
||||
Après vous être connecté, sous le répertoire Web vous verrez un dossier `www` qui contient les fichiers publics servis par cette application. Vous pouvez mettre tous les fichiers de votre application Web personnalisée à l'intérieur.
|
||||
Après vous être connecté avec SFTP, sous le répertoire Web, vous verrez un dossier `www` qui contient les fichiers publics servis par cette application. Vous pouvez mettre tous les fichiers de votre application Web personnalisée à l'intérieur.
|
||||
|
||||
### Gestion des erreurs 403 et 404
|
||||
### Oubli du mot de passe SFTP
|
||||
|
||||
La configuration du serveur web prend en charge la gestion des erreurs http `403` et `404` (accès refusé et ressource non trouvée). Ajoutez un dossier `error` à l'emplacement `__INSTALL_DIR__/www/error`, puis ajoutez-y vos fichiers `403.html` et `404.html`.
|
||||
Si vous avez oublié votre mot de passe SFTP, vous pouvez le changer dans la webadmin de Yunohost dans `Applications > Votre webapp > My Webapp configuration`.
|
||||
|
||||
## Résolution de problèmes
|
||||
|
||||
Si vous n'arrivez pas à vous connecter et que vous avez vérifié que le nom d'utilisateur et le mot de passe sont bons, vérifiez si SFTP est activé pour votre app
|
||||
|
||||
### Personnaliser la configuration nginx
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
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_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**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.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
Cette application vous permet d'installer facilement une application vide personnalisée, fourni un accès aux fichiers avec [SFTP](https://yunohost.org/fr/filezilla).
|
||||
|
||||
Elle peut également créer une base de données MySQL ou PostgreSQL - 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.
|
||||
Elle 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.
|
||||
|
||||
La version de PHP-FPM peut aussi être choisie, parmi `none`, `7.4`, `8.0`, `8.1` et `8.2`.
|
||||
|
||||
**Une fois installé, rendez-vous sur 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 mettre tous les fichiers de votre application Web personnalisée à l'intérieur.
|
||||
|
||||
L'application vous permet aussi de gérer - si vous activez l'option dans le panneau de configuration - la gestion des erreurs 404, il vous suffit de créer un dossier `error` dans le répertoire racine `www` et d'y placer vos fichiers d'erreur `html`
|
|
@ -1,12 +1,7 @@
|
|||
{% if database != 'none' %}
|
||||
If you have requested a MYSQL database, please find information about this SQL database:
|
||||
|
||||
Here are information to log into the database:
|
||||
|
||||
- Type: __DATABASE__
|
||||
- Database user: __DB_USER__
|
||||
- Database name: __DB_NAME__
|
||||
- Password: __DB_PWD__
|
||||
|
||||
{% endif %}
|
||||
|
||||
The admin documentation below contains information on how to connect using SFTP to edit the website content.
|
||||
The admin documentation below also contain information on how to connect using SFTP to edit the website content.
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
{% if database != 'none' %}
|
||||
Si vous avez demandé une base de données MYSQL, voici les informations de cette base de données SQL :
|
||||
|
||||
Voici les informations pour se connecter à la base de donnée:
|
||||
|
||||
- Type : __DATABASE__
|
||||
- Utilisateur de la base de données : __DB_USER__
|
||||
- Nom de la base de données : __DB_NAME__
|
||||
- Mot de passe : __DB_PWD__
|
||||
|
||||
{% endif %}
|
||||
|
||||
La documentation ci-dessous contient les informations pour se connecter en SSH et modifier le contenu du site web.
|
||||
La documentation ci-dessous contient également les informations pour se connecter en SSH et modifier le contenu du site web.
|
||||
|
|
|
@ -5,7 +5,7 @@ name = "My Webapp"
|
|||
description.en = "Custom Web app with SFTP access to serve static (HTML, CSS, JS) and PHP files"
|
||||
description.fr = "Application Web personnalisée avec accès SFTP pour servir des fichiers statiques (HTML, CSS, JS) et PHP"
|
||||
|
||||
version = "1.0~ynh19"
|
||||
version = "1.0~ynh15"
|
||||
|
||||
maintainers = []
|
||||
|
||||
|
@ -14,7 +14,7 @@ license = "GPL-3.0-only"
|
|||
code = "https://github.com/YunoHost-Apps/my_webapp_ynh"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.2.4"
|
||||
yunohost = ">= 11.1.19"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
ldap = "not_relevant"
|
||||
|
@ -48,22 +48,15 @@ ram.runtime = "50M"
|
|||
[install.phpversion]
|
||||
ask.en = "Choose a PHP version you want to use for your app"
|
||||
ask.fr = "Choisissez une version PHP que vous souhaitez utiliser pour votre application"
|
||||
type = "select"
|
||||
choices = ["none", "7.4", "8.0", "8.1", "8.2", "8.3"]
|
||||
default = "8.3"
|
||||
type = "string"
|
||||
choices = ["none", "7.4", "8.0", "8.1", "8.2"]
|
||||
default = "8.0"
|
||||
|
||||
[install.database]
|
||||
ask.en = "Do you need a database?"
|
||||
ask.fr = "Avez-vous besoin d'une base de données ?"
|
||||
type = "select"
|
||||
choices = [ "none", "mysql", "postgresql" ]
|
||||
default = "none"
|
||||
|
||||
[install.custom_error_file]
|
||||
ask = "Activate the custom error file use"
|
||||
[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
|
||||
help = "Once custom error enabled, you can add/create a custom `404.html` file in a directory `www/error`."
|
||||
|
||||
[resources]
|
||||
[resources.system_user]
|
||||
|
@ -76,21 +69,13 @@ ram.runtime = "50M"
|
|||
[resources.apt]
|
||||
packages = "nginx" # Kind of "dummy" value to be sure to have a non-empty dep list
|
||||
packages_from_raw_bash = """
|
||||
if [[ "$database" == "mysql" ]]; then
|
||||
if [[ "$with_mysql" = 1 ]]
|
||||
then
|
||||
echo "mariadb-server"
|
||||
|
||||
if [[ "$phpversion" != none ]]; then
|
||||
echo "php${phpversion}-mysql"
|
||||
fi
|
||||
elif [[ "$database" == "postgresql" ]]; then
|
||||
echo "postgresql postgresql-contrib"
|
||||
|
||||
if [[ "$phpversion" != none ]]; then
|
||||
echo "php${phpversion}-pgsql"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$phpversion" != none ]]; then
|
||||
echo "php${phpversion}-fpm"
|
||||
if [[ "$phpversion" != none ]]
|
||||
then
|
||||
echo "php${phpversion}-fpm php${phpversion}-mysql"
|
||||
fi
|
||||
"""
|
||||
|
|
|
@ -40,15 +40,10 @@ fi
|
|||
# BACKUP THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
||||
if [ $database != "none" ]
|
||||
if [ $with_mysql -eq 1 ]
|
||||
then
|
||||
ynh_print_info --message="Backing up the database..."
|
||||
|
||||
if [ $database == "mysql" ]; then
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||
elif [ $database == "postgresql" ]; then
|
||||
ynh_psql_dump_db --database="$db_name" > db.sql
|
||||
fi
|
||||
ynh_print_info --message="Backing up the MySQL database..."
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -52,12 +52,6 @@ then
|
|||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
|
||||
# Update custom error file path if needed
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
@ -68,7 +62,6 @@ then
|
|||
# Delete file checksum for the old conf file location
|
||||
ynh_delete_file_checksum --file="$nginx_conf_path"
|
||||
ynh_delete_file_checksum --file="$nginx_extra_conf_dir/php.conf"
|
||||
ynh_delete_file_checksum --file="$nginx_extra_conf_dir/error-code.conf"
|
||||
|
||||
path_url="$new_path"
|
||||
domain="$old_domain"
|
||||
|
@ -80,14 +73,7 @@ then
|
|||
mv $nginx_extra_conf_dir /etc/nginx/conf.d/$new_domain.d/$app.d
|
||||
|
||||
# Store file checksum for the new config file location
|
||||
if [ $phpversion != "none" ]
|
||||
then
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/php.conf"
|
||||
fi
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/error-code.conf"
|
||||
fi
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/php.conf"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -59,7 +59,7 @@ get__free_footprint() {
|
|||
#=================================================
|
||||
|
||||
set__password() {
|
||||
if [ ! "$password" == "" ]
|
||||
if [ "$password" == "" ]
|
||||
then
|
||||
ynh_app_setting_set --app=$app --key=password --value="$password"
|
||||
fi
|
||||
|
@ -112,21 +112,13 @@ ynh_app_config_apply() {
|
|||
|
||||
if [ "${changed[phpversion]}" == "true" ]
|
||||
then
|
||||
if [ "${old[phpversion]}" != "none" ]
|
||||
then
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value="${old[phpversion]}"
|
||||
ynh_remove_fpm_config
|
||||
fi
|
||||
ynh_remove_app_dependencies
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value="${old[phpversion]}"
|
||||
ynh_remove_fpm_config
|
||||
# ^ the helper includes ynh_remove_app_dependencies
|
||||
YNH_PHP_VERSION=$phpversion
|
||||
# ^ ynh_add_config replaces __PHPVERSION__ by __PHP_YNH_VERSION__...
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value="$phpversion"
|
||||
|
||||
database=$(ynh_app_setting_get --app=$app --key=database)
|
||||
dependencies="$(ynh_read_manifest -k "resources.apt.packages")"
|
||||
dependencies_from_raw_bash=$(eval "$(ynh_read_manifest -k "resources.apt.packages_from_raw_bash")" | tr "\n" " ")
|
||||
ynh_install_app_dependencies "$dependencies $dependencies_from_raw_bash"
|
||||
|
||||
nginx_extra_conf_dir="/etc/nginx/conf.d/$domain.d/$app.d"
|
||||
mkdir -p "$nginx_extra_conf_dir"
|
||||
if [ "$phpversion" == "none" ]
|
||||
|
@ -135,6 +127,7 @@ ynh_app_config_apply() {
|
|||
ynh_secure_remove --file="$nginx_extra_conf_dir/php.conf"
|
||||
else
|
||||
ynh_add_config --template="nginx-php.conf" --destination="$nginx_extra_conf_dir/php.conf"
|
||||
ynh_install_app_dependencies "php${phpversion}-fpm"
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
||||
# ^ the helper takes care of ynh_app_setting_set the phpversion
|
||||
fi
|
||||
|
@ -154,26 +147,6 @@ ynh_app_config_apply() {
|
|||
then
|
||||
ynh_system_user_del_group --username=$app --groups="sftp.app"
|
||||
fi
|
||||
|
||||
if [ "${changed[password]}" == "true" ] && [ ! "$password" == "" ]
|
||||
then
|
||||
chpasswd <<< "${app}:${password}"
|
||||
fi
|
||||
|
||||
if [ "${changed[custom_error_file]}" == "true" ]
|
||||
then
|
||||
CUSTOM_ERROR_FILE=$custom_error_file
|
||||
nginx_extra_conf_dir="/etc/nginx/conf.d/$domain.d/$app.d"
|
||||
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
elif [ $custom_error_file -eq 0 ]
|
||||
then
|
||||
ynh_secure_remove --file="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
fi
|
||||
|
||||
if [ "$phpversion" != "none" ]
|
||||
then
|
||||
|
|
|
@ -35,8 +35,9 @@ ynh_app_setting_set --app=$app --key=password --value=$password
|
|||
# CREATE A MYSQL DATABASE
|
||||
#=================================================
|
||||
|
||||
if [ $database != "none" ]; then
|
||||
ynh_script_progression --message="Creating a database..." --weight=2
|
||||
if [ $with_mysql -eq 1 ]
|
||||
then
|
||||
ynh_script_progression --message="Creating a MySQL database..." --weight=2
|
||||
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
db_user=$db_name
|
||||
|
@ -44,12 +45,7 @@ if [ $database != "none" ]; then
|
|||
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
|
||||
|
||||
if [ $database == "mysql" ]; then
|
||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
elif [ $database == "postgresql" ]; then
|
||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
fi
|
||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -67,13 +63,6 @@ then
|
|||
YNH_PHP_VERSION="$phpversion"
|
||||
fi
|
||||
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
# Add the custom error build with the application
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
ynh_add_config --template="example-custom-nginx-config.conf" --destination="$nginx_extra_conf_dir/sample.conf"
|
||||
|
|
|
@ -15,18 +15,14 @@ source /usr/share/yunohost/helpers
|
|||
# REMOVE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
||||
if [ $database != "none" ]; then
|
||||
ynh_script_progression --message="Removing the database..." --weight=2
|
||||
if [ $with_mysql -eq 1 ]; then
|
||||
ynh_script_progression --message="Removing the MySQL database..." --weight=2
|
||||
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
|
||||
# Remove a database if it exists, along with the associated user
|
||||
if [ $database == "mysql" ]; then
|
||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
elif [ $database == "postgresql" ]; then
|
||||
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
fi
|
||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -14,26 +14,20 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.d"
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.d/"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
|
||||
if [ $database != "none" ]; then
|
||||
ynh_script_progression --message="Restoring the database..."
|
||||
if [ $with_mysql -eq 1 ]; then
|
||||
ynh_script_progression --message="Restoring the MySQL database..."
|
||||
|
||||
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)
|
||||
|
||||
if [ $database == "mysql" ]; then
|
||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
elif [ $database == "postgresql" ]; then
|
||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
fi
|
||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -20,18 +20,6 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
# If database doesn't exist, create it and remove with_mysql setting
|
||||
if [ -z "${database:-}" ]; then
|
||||
if [ $with_mysql -eq 1 ]; then
|
||||
database="mysql"
|
||||
else
|
||||
database="none"
|
||||
fi
|
||||
|
||||
ynh_app_setting_set --app=$app --key=database --value=$database
|
||||
ynh_app_setting_delete --app=$app --key=with_mysql
|
||||
fi
|
||||
|
||||
# If admin_mail_html doesn't exist, create it
|
||||
if [ -z "${admin_mail_html:-}" ]; then
|
||||
admin_mail_html=1
|
||||
|
@ -68,12 +56,6 @@ if [ -z "$phpversion" ]; then
|
|||
ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion
|
||||
fi
|
||||
|
||||
# If custom_error_file doesn't exist, create it.
|
||||
if [ -z "${custom_error_file:-}" ]; then
|
||||
custom_error_file=0
|
||||
ynh_app_setting_set --app=$app --key=custom_error_file --value=$custom_error_file
|
||||
fi
|
||||
|
||||
# Delete old user
|
||||
if [ -n "$(ynh_app_setting_get --app=$app --key=user)" ]
|
||||
then
|
||||
|
@ -108,12 +90,6 @@ then
|
|||
YNH_PHP_VERSION="$phpversion"
|
||||
fi
|
||||
|
||||
# Add the config error code
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
ynh_add_config --template="example-custom-nginx-config.conf" --destination="$nginx_extra_conf_dir/sample.conf"
|
||||
|
|
46
tests.toml
46
tests.toml
|
@ -7,55 +7,15 @@ test_format = 1.0
|
|||
# -------------------------------
|
||||
|
||||
args.with_sftp = "1"
|
||||
args.custom_error_file = "0"
|
||||
args.password = "SuperDuper_StrongPassw0rd"
|
||||
args.database = "none"
|
||||
args.phpversion = "8.3"
|
||||
test_upgrade_from.bf5d3ed.name = "1.0~ynh14"
|
||||
test_upgrade_from.bf5d3ed.args.with_mysql = "0"
|
||||
test_upgrade_from.bf5d3ed.args.domain = "sub.domain.tld"
|
||||
test_upgrade_from.bf5d3ed.args.path = "/"
|
||||
test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd"
|
||||
args.with_mysql = "1"
|
||||
args.phpversion = "8.0"
|
||||
|
||||
[80_test]
|
||||
|
||||
only = ["install.subdir", "backup_restore", "upgrade" ]
|
||||
args.phpversion = "8.0"
|
||||
|
||||
[81_test]
|
||||
|
||||
only = ["install.subdir", "backup_restore", "upgrade" ]
|
||||
args.phpversion = "8.1"
|
||||
|
||||
[82_test]
|
||||
|
||||
only = ["install.subdir", "backup_restore", "upgrade" ]
|
||||
args.phpversion = "8.2"
|
||||
|
||||
[none_test]
|
||||
|
||||
args.phpversion = "none"
|
||||
|
||||
[mysql_test]
|
||||
|
||||
only = ["install.subdir", "backup_restore", "upgrade", "upgrade.bf5d3ed" ]
|
||||
args.database = "mysql"
|
||||
test_upgrade_from.bf5d3ed.name = "1.0~ynh14"
|
||||
test_upgrade_from.bf5d3ed.args.with_mysql = "1"
|
||||
test_upgrade_from.bf5d3ed.args.domain = "sub.domain.tld"
|
||||
test_upgrade_from.bf5d3ed.args.path = "/"
|
||||
test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd"
|
||||
|
||||
[postgresql_test]
|
||||
|
||||
only = ["install.subdir", "backup_restore", "upgrade" ]
|
||||
args.database = "postgresql"
|
||||
|
||||
[custom_error_file_test]
|
||||
|
||||
args.custom_error_file = "1"
|
||||
test_upgrade_from.bf5d3ed.name = "1.0~ynh14"
|
||||
test_upgrade_from.bf5d3ed.args.with_mysql = "0"
|
||||
test_upgrade_from.bf5d3ed.args.domain = "sub.domain.tld"
|
||||
test_upgrade_from.bf5d3ed.args.path = "/"
|
||||
test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd"
|
||||
args.phpversion = "none"
|
||||
|
|
Loading…
Add table
Reference in a new issue