1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lxd-dashboard_ynh.git synced 2024-09-03 19:36:18 +02:00

Merge pull request #10 from YunoHost-Apps/upgrade

Fix #9
This commit is contained in:
yalh76 2022-06-19 02:17:50 +02:00 committed by GitHub
commit 40222fcfd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 82 additions and 70 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# LXD Dashboard for YunoHost
[![Integration level](https://dash.yunohost.org/integration/lxd-dashboard.svg)](https://dash.yunohost.org/appci/app/lxd-dashboard) ![](https://ci-apps.yunohost.org/ci/badges/lxd-dashboard.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lxd-dashboard.maintain.svg)
[![Integration level](https://dash.yunohost.org/integration/lxd-dashboard.svg)](https://dash.yunohost.org/appci/app/lxd-dashboard) ![Working status](https://ci-apps.yunohost.org/ci/badges/lxd-dashboard.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/lxd-dashboard.maintain.svg)
[![Install LXD Dashboard with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lxd-dashboard)
*[Lire ce readme en français.](./README_fr.md)*
@ -15,32 +15,37 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview
Makes it easy for you to take control of your LXD based infrastructure
**Shipped version:** 3.4.0~ynh1
Web-based user interface capable of managing multiple LXD servers from a single location.
**Shipped version:** 3.4.0~ynh2
## Screenshots
![](./doc/screenshots/screenshot01.png)
![Screenshot of LXD Dashboard](./doc/screenshots/screenshot01.png)
## Disclaimers / important information
* Important:
* Since version 3.4.0~ynh2, after a bad authentication that don't let you login, just refresh the page
## Documentation and resources
* Official app website: https://lxdware.com
* Upstream app code repository: https://github.com/lxdware/lxd-dashboard
* YunoHost documentation for this app: https://yunohost.org/app_lxd-dashboard
* Report a bug: https://github.com/YunoHost-Apps/lxd-dashboard_ynh/issues
* Official app website: <https://lxdware.com>
* Upstream app code repository: <https://github.com/lxdware/lxd-dashboard>
* YunoHost documentation for this app: <https://yunohost.org/app_lxd-dashboard>
* Report a bug: <https://github.com/YunoHost-Apps/lxd-dashboard_ynh/issues>
## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/lxd-dashboard_ynh/tree/testing).
To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/lxd-dashboard_ynh/tree/testing --debug
or
sudo yunohost app upgrade lxd-dashboard -u https://github.com/YunoHost-Apps/lxd-dashboard_ynh/tree/testing --debug
```
**More info regarding app packaging:** https://yunohost.org/packaging_apps
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,42 +1,51 @@
<!--
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.
-->
# LXD Dashboard pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/lxd-dashboard.svg)](https://dash.yunohost.org/appci/app/lxd-dashboard) ![](https://ci-apps.yunohost.org/ci/badges/lxd-dashboard.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/lxd-dashboard.maintain.svg)
[![Niveau d'intégration](https://dash.yunohost.org/integration/lxd-dashboard.svg)](https://dash.yunohost.org/appci/app/lxd-dashboard) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/lxd-dashboard.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/lxd-dashboard.maintain.svg)
[![Installer LXD Dashboard avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=lxd-dashboard)
*[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer LXD Dashboard 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
Web-based user interface capable of managing multiple LXD servers from a single location.
**Version incluse :** 3.4.0~ynh1
**Version incluse :** 3.4.0~ynh2
## Captures d'écran
![](./doc/screenshots/screenshot01.png)
![Capture d'écran de LXD Dashboard](./doc/screenshots/screenshot01.png)
## Avertissements / informations importantes
* Important:
* Since version 3.4.0~ynh2, after a bad authentication that don't let you login, just refresh the page
## Documentations et ressources
* Site officiel de l'app : https://lxdware.com
* Dépôt de code officiel de l'app : https://github.com/lxdware/lxd-dashboard
* Documentation YunoHost pour cette app : https://yunohost.org/app_lxd-dashboard
* Signaler un bug : https://github.com/YunoHost-Apps/lxd-dashboard_ynh/issues
* Site officiel de l'app : <https://lxdware.com>
* Dépôt de code officiel de l'app : <https://github.com/lxdware/lxd-dashboard>
* Documentation YunoHost pour cette app : <https://yunohost.org/app_lxd-dashboard>
* Signaler un bug : <https://github.com/YunoHost-Apps/lxd-dashboard_ynh/issues>
## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/lxd-dashboard_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/lxd-dashboard_ynh/tree/testing --debug
ou
sudo yunohost app upgrade lxd-dashboard -u https://github.com/YunoHost-Apps/lxd-dashboard_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>

View file

@ -1,14 +1,9 @@
# See here for more information
# https://github.com/YunoHost/package_check#syntax-check_process-file
# Move this file from check_process.default to check_process when you have filled it.
;; Test complet
; Manifest
domain="domain.tld"
path="/path"
admin="john"
is_public=1
admin="john"
password="1Strong-Password"
; Checks
pkg_linter=1
@ -18,7 +13,8 @@
setup_private=1
setup_public=1
upgrade=1
#upgrade=1 from_commit=CommitHash
# 3.4.0~ynh1
upgrade=1 from_commit=ed116405de78fe380bb9abf309b47d5c4f6fa005
backup_restore=1
multi_instance=1
port_already_use=0

View file

@ -0,0 +1 @@
Web-based user interface capable of managing multiple LXD servers from a single location.

View file

@ -0,0 +1,2 @@
* Important:
* Since version 3.4.0~ynh2, after a bad authentication that don't let you login, just refresh the page

View file

@ -5,7 +5,7 @@
"description": {
"en": "Makes it easy for you to take control of your LXD based infrastructure"
},
"version": "3.4.0~ynh1",
"version": "3.4.0~ynh2",
"url": "https://lxdware.com",
"upstream": {
"license": "AGPL-3.0-or-later",
@ -37,15 +37,15 @@
"example": "/lxd-dashboard",
"default": "/lxd-dashboard"
},
{
"name": "admin",
"type": "user"
},
{
"name": "is_public",
"type": "boolean",
"default": true
},
{
"name": "admin",
"type": "user"
},
{
"name": "password",
"type": "password"

View file

@ -25,10 +25,9 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC
admin=$YNH_APP_ARG_ADMIN
password=$YNH_APP_ARG_PASSWORD
admin_mail=$(ynh_user_get_info --username=$admin --key=mail)
app=$YNH_APP_INSTANCE_NAME
@ -92,14 +91,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
@ -108,6 +99,14 @@ ynh_script_progression --message="Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SPECIFIC SETUP
#=================================================
@ -137,9 +136,9 @@ ynh_permission_update --permission="main" --add="visitors"
# Installation with curl
ynh_script_progression --message="Finalizing installation..."
ynh_local_curl "/backend/config/login.php?database_type=mysql&database_host=localhost&database_name=$db_name&database_user=$db_user&action=writeDatabaseConfig" "database_password=$db_pwd"
ynh_local_curl "./backend/admin/settings.php?action=createUser" "username=$admin" "password=$password" "email=$admin_mail"
ynh_local_curl "/backend/admin/settings.php?action=createUser" "username=$admin" "password=$password"
ynh_local_curl "/backend/admin/settings.php?action=createUser" "email=$(ynh_user_get_info --username=$admin --key=mail)" "first_name=$(ynh_user_get_info --username=$admin --key=firstname)" "last_name=$(ynh_user_get_info --username=$admin --key=lastname)" "password=$password" "username=$admin"
# Remove the public access
ynh_permission_update --permission="main" --remove="visitors"

View file

@ -43,8 +43,8 @@ ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE DATA DIR
#=================================================
ynh_script_progression --message="Removing app data directory..."
ynh_secure_remove --file="$datadir/data"
ynh_secure_remove --file="$datadir/backups"

View file

@ -45,13 +45,6 @@ test ! -d $final_path \
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
@ -84,13 +77,6 @@ chmod 750 "$datadir"
chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# SPECIFIC RESTORATION
#=================================================
@ -101,6 +87,20 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================

View file

@ -85,14 +85,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
@ -108,6 +100,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SPECIFIC UPGRADE
#=================================================