mirror of
https://github.com/YunoHost-Apps/metabase_ynh.git
synced 2024-09-03 19:46:00 +02:00
commit
4eb6036856
9 changed files with 56 additions and 67 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
Web database management tool
|
||||
|
||||
**Shipped version:** 0.40.2~ynh2
|
||||
**Shipped version:** 0.41.2~ynh1
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,6 @@ Web database management tool
|
|||
## Documentation and resources
|
||||
|
||||
* Official app website: https://www.metabase.com/
|
||||
* Official user documentation: https://yunohost.org/apps
|
||||
* Official admin documentation: https://www.metabase.com/docs/latest/
|
||||
* Upstream app code repository: https://github.com/metabase/metabase
|
||||
* YunoHost documentation for this app: https://yunohost.org/app_metabase
|
||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
|||
|
||||
Outil web de gestion des bases de données
|
||||
|
||||
**Version incluse :** 0.40.2~ynh2
|
||||
**Version incluse :** 0.41.2~ynh1
|
||||
|
||||
|
||||
|
||||
|
@ -24,7 +24,6 @@ Outil web de gestion des bases de données
|
|||
## Documentations et ressources
|
||||
|
||||
* Site officiel de l'app : https://www.metabase.com/
|
||||
* Documentation officielle utilisateur : https://yunohost.org/apps
|
||||
* Documentation officielle de l'admin : https://www.metabase.com/docs/latest/
|
||||
* Dépôt de code officiel de l'app : https://github.com/metabase/metabase
|
||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_metabase
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
upgrade=1
|
||||
backup_restore=1
|
||||
multi_instance=0
|
||||
port_already_use=0
|
||||
change_url=0
|
||||
;;; Options
|
||||
Email=
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://downloads.metabase.com/v0.40.2/metabase.jar
|
||||
SOURCE_SUM=4d5cd90c7c12b459510dc7955c2d5a8db5845c0ed3bb8dcdc6f548182374e8e9
|
||||
SOURCE_URL=https://downloads.metabase.com/v0.41.2/metabase.jar
|
||||
SOURCE_SUM=d2303557342f3d88437d634fd38bd4b3657b7a31e5ad891e45b001801c121bf5
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=jar
|
||||
SOURCE_IN_SUBDIR=false
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
location / {
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
|
||||
#WebSocket Support
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
#WebSocket Support
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
"en": "Web database management tool",
|
||||
"fr": "Outil web de gestion des bases de données"
|
||||
},
|
||||
"version": "0.40.2~ynh2",
|
||||
"version": "0.41.2~ynh1",
|
||||
"url": "https://www.metabase.com/",
|
||||
"upstream": {
|
||||
"license": "AGPL-3.0-only",
|
||||
"website": "https://www.metabase.com/",
|
||||
"admindoc": "https://www.metabase.com/docs/latest/",
|
||||
"userdoc": "https://yunohost.org/apps",
|
||||
"code": "https://github.com/metabase/metabase"
|
||||
},
|
||||
"license": "AGPL-3.0-only",
|
||||
|
@ -22,7 +21,7 @@
|
|||
"url": ""
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.2.0"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
|
|
@ -81,7 +81,7 @@ ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
|
|||
ynh_script_progression --message="Configuring system user..." --weight=2
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -126,16 +126,12 @@ chown $app "/etc/default/$app"
|
|||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring log rotation..." --weight=1
|
||||
|
||||
# Create log directory
|
||||
mkdir -p /var/log/$app
|
||||
touch /var/log/$app/$app.log
|
||||
chown -R $app /var/log/$app
|
||||
|
||||
# Setup logrotate
|
||||
ynh_use_logrotate --specific_user=$app/$app
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
|
|
|
@ -96,14 +96,10 @@ ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
|||
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
|
||||
|
||||
#=================================================
|
||||
# HANDLE LOG FILES AND LOGROTATE
|
||||
# RESTORE THE LOGROTATE CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
|
||||
|
||||
mkdir -p /var/log/$app
|
||||
touch /var/log/$app/$app.log
|
||||
chown $app -R /var/log/$app
|
||||
|
||||
# Restore logrotate configuration
|
||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -30,6 +30,29 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up Streama before upgrading (may take a while)..." --weight=2
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=20
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
#=================================================
|
||||
|
@ -55,27 +78,12 @@ if ynh_legacy_permissions_exists; then
|
|||
fi
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up Streama before upgrading (may take a while)..." --weight=2
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Stopping a systemd service..." --weight=20
|
||||
|
||||
ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log"
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -132,13 +140,8 @@ chown $app "/etc/default/$app"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring log rotation..." --weight=3
|
||||
|
||||
# Create log directory
|
||||
mkdir -p /var/log/$app
|
||||
touch /var/log/$app/$app.log
|
||||
chown -R $app /var/log/$app
|
||||
|
||||
# Setup logrotate
|
||||
ynh_use_logrotate --specific_user=$app/$app
|
||||
ynh_use_logrotate
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
|
|
Loading…
Add table
Reference in a new issue