1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/immich_ynh.git synced 2024-09-03 20:36:24 +02:00
This commit is contained in:
Éric Gaspar 2023-05-27 16:09:22 +02:00
parent 02d3352870
commit 9cf2f1f232
7 changed files with 10 additions and 35 deletions

View file

@ -3,19 +3,19 @@
"id": "immich", "id": "immich",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "Self-hosted photo and video backup solution directly from your mobile phone.", "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." "fr": "Solution auto-hébergée pour la sauvegarde de photos et de vidéos directement depuis votre mobile"
}, },
"version": "1.26.0~ynh1", "version": "1.26.0~ynh1",
"url": "https://www.immich.app", "url": "https://www.immich.app",
"upstream": { "upstream": {
"license": "mit", "license": "MIT",
"website": "https://www.immich.app", "website": "https://www.immich.app",
"admindoc": "https://github.com/immich-app/immich#getting-started", "admindoc": "https://github.com/immich-app/immich#getting-started",
"userdoc": "https://github.com/immich-app/immich#getting-started", "userdoc": "https://github.com/immich-app/immich#getting-started",
"code": "https://github.com/immich-app/immich" "code": "https://github.com/immich-app/immich"
}, },
"license": "mit", "license": "MIT",
"maintainer": { "maintainer": {
"name": "limezy" "name": "limezy"
}, },
@ -35,8 +35,8 @@
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"example": "/example", "example": "/immich",
"default": "/example" "default": "/immich"
}, },
{ {
"name": "is_public", "name": "is_public",

View file

@ -38,8 +38,6 @@ pkg_dependencies="npm musl-dev libvips postgresql ffmpeg"
# apt-get install musl-dev # apt-get install musl-dev
# ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 # ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
#================================================= #=================================================
# EXPERIMENTAL HELPERS # EXPERIMENTAL HELPERS
#================================================= #=================================================

View file

@ -40,11 +40,6 @@ jwt=$(ynh_app_setting_get --app=$app --key=jwt)
#================================================= #=================================================
ynh_print_info --message="Declaring files to be backed up..." 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 # BACKUP THE APP MAIN DIR
#================================================= #=================================================
@ -97,9 +92,6 @@ ynh_backup --src_path="/etc/$app/"
#================================================= #=================================================
ynh_print_info --message="Backing up the MySQL database..." 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 ynh_mysql_dump_db --database="$db_name" > db.sql
#================================================= #=================================================

View file

@ -29,11 +29,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
# Needed for helper "ynh_add_nginx_config" # Needed for helper "ynh_add_nginx_config"
final_path=$(ynh_app_setting_get --app=$app --key=final_path) 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 # BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#================================================= #=================================================

View file

@ -74,7 +74,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
ynh_script_progression --message="Installing dependencies..." --weight=1 ynh_script_progression --message="Installing dependencies..." --weight=1
# Install nodejs # Install nodejs
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION 2>&1 ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
# sudo ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1 # 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" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1 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 # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config

View file

@ -61,12 +61,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$final_path" 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 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
@ -112,14 +106,14 @@ ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # 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" ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # 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" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -150,7 +150,7 @@ ynh_add_fpm_config
#================================================= #=================================================
# NGINX CONFIGURATION # 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 # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config