1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/joplin_ynh.git synced 2024-09-03 19:36:03 +02:00
This commit is contained in:
eric_G 2024-07-03 11:36:01 +02:00 committed by GitHub
commit 8f4078012b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 3 deletions

View file

@ -23,3 +23,5 @@ MAILER_AUTH_USER=__APP__
MAILER_AUTH_PASSWORD=__MAIL_PWD__
MAILER_NOREPLY_NAME=__APP__
MAILER_NOREPLY_EMAIL=reply@__DOMAIN__
STORAGE_DRIVER=Type=Filesystem; Path=__DATA_DIR__

View file

@ -55,6 +55,8 @@ ram.runtime = "280M"
[resources.install_dir]
[resources.data_dir]
[resources.permissions]
main.url = "/"
api.url = "/api"

View file

@ -21,6 +21,12 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE DATA DIR
#=================================================
ynh_backup --src_path="$data_dir" --is_big
#=================================================
# SYSTEM CONFIGURATION
#=================================================

View file

@ -69,9 +69,9 @@ ynh_script_progression --message="Building $app..." --weight=10
pushd $install_dir/packages/server
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH BUILD_SEQUENCIAL=1 yarn install --inline-builds
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn build
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn cache clean
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production BUILD_SEQUENCIAL=1 yarn install --inline-builds
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn build
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH NODE_ENV=production yarn cache clean
ynh_secure_remove .yarn/berry
popd

View file

@ -19,6 +19,15 @@ ynh_restore_file --origin_path="$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$data_dir" --not_mandatory
chown -R "$app:www-data" "$data_dir"
#=================================================
# RESTORE THE PostgreSQL DATABASE
#=================================================