mirror of
https://github.com/YunoHost-Apps/immich_ynh.git
synced 2024-09-03 20:36:24 +02:00
cleaning
This commit is contained in:
parent
02d3352870
commit
9cf2f1f232
7 changed files with 10 additions and 35 deletions
|
@ -3,19 +3,19 @@
|
|||
"id": "immich",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "Self-hosted photo and video backup solution directly from your mobile phone.",
|
||||
"fr": "Solution auto-hébergée pour la sauvegarde de photos et de vidéos directement depuis votre mobile."
|
||||
"en": "Self-hosted photo and video backup solution directly from your mobile phone",
|
||||
"fr": "Solution auto-hébergée pour la sauvegarde de photos et de vidéos directement depuis votre mobile"
|
||||
},
|
||||
"version": "1.26.0~ynh1",
|
||||
"url": "https://www.immich.app",
|
||||
"upstream": {
|
||||
"license": "mit",
|
||||
"license": "MIT",
|
||||
"website": "https://www.immich.app",
|
||||
"admindoc": "https://github.com/immich-app/immich#getting-started",
|
||||
"userdoc": "https://github.com/immich-app/immich#getting-started",
|
||||
"code": "https://github.com/immich-app/immich"
|
||||
},
|
||||
"license": "mit",
|
||||
"license": "MIT",
|
||||
"maintainer": {
|
||||
"name": "limezy"
|
||||
},
|
||||
|
@ -35,8 +35,8 @@
|
|||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"example": "/example",
|
||||
"default": "/example"
|
||||
"example": "/immich",
|
||||
"default": "/immich"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
|
|
|
@ -38,8 +38,6 @@ pkg_dependencies="npm musl-dev libvips postgresql ffmpeg"
|
|||
# apt-get install musl-dev
|
||||
# ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
|
||||
|
||||
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -40,11 +40,6 @@ jwt=$(ynh_app_setting_get --app=$app --key=jwt)
|
|||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs
|
||||
### to be backuped and not an actual copy of any file. The actual backup that
|
||||
### creates and fill the archive with the files happens in the core after this
|
||||
### script is called. Hence ynh_backups calls takes basically 0 seconds to run.
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -97,9 +92,6 @@ ynh_backup --src_path="/etc/$app/"
|
|||
#=================================================
|
||||
ynh_print_info --message="Backing up the MySQL database..."
|
||||
|
||||
### (However, things like MySQL dumps *do* take some time to run, though the
|
||||
### copy of the generated dump to the archive still happens later)
|
||||
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -29,11 +29,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
|||
# Needed for helper "ynh_add_nginx_config"
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
# Add settings here as needed by your application
|
||||
#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)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
|
|
@ -74,7 +74,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
|||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
|
||||
# Install nodejs
|
||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION 2>&1
|
||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
# sudo ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
|
||||
|
@ -113,15 +113,11 @@ 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..." --weight=1
|
||||
|
||||
### `ynh_add_nginx_config` will use the file conf/nginx.conf
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
|
|
|
@ -61,12 +61,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
# FIXME: this should be managed by the core in the future
|
||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
||||
# such that the appropriate users (e.g. maybe www-data) can access
|
||||
# files in some cases.
|
||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
||||
# this will be treated as a security issue.
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
@ -112,14 +106,14 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --time --weight=1
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
|
||||
|
||||
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..." --time --weight=1
|
||||
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ ynh_add_fpm_config
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
|
Loading…
Add table
Reference in a new issue