mirror of
https://github.com/YunoHost-Apps/joplin_ynh.git
synced 2024-09-03 19:36:03 +02:00
Merge a963ce3962
into c013d3d460
This commit is contained in:
commit
8f4078012b
5 changed files with 22 additions and 3 deletions
|
@ -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__
|
||||
|
|
|
@ -55,6 +55,8 @@ ram.runtime = "280M"
|
|||
|
||||
[resources.install_dir]
|
||||
|
||||
[resources.data_dir]
|
||||
|
||||
[resources.permissions]
|
||||
main.url = "/"
|
||||
api.url = "/api"
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue