mirror of
https://github.com/YunoHost-Apps/crabfit_ynh.git
synced 2024-09-03 18:16:21 +02:00
Remove cache and temporary files from the install_dir (lighter backups)
This commit is contained in:
parent
7c0cb6d68d
commit
288fc6dc4a
2 changed files with 6 additions and 1 deletions
|
@ -10,7 +10,7 @@ Group=__APP__
|
|||
WorkingDirectory=__INSTALL_DIR__/api
|
||||
StandardOutput=append:/var/log/__APP__/__APP__-back.log
|
||||
StandardError=inherit
|
||||
ExecStart=__INSTALL_DIR__/api/target/release/crabfit-api
|
||||
ExecStart=__INSTALL_DIR__/crabfit-api
|
||||
|
||||
# Sandboxing options to harden security
|
||||
# Depending on specificities of your service/app, you may need to tweak these
|
||||
|
|
|
@ -34,12 +34,15 @@ function build_backend
|
|||
# Remove build files and rustup
|
||||
ynh_secure_remove --file="$install_dir/api/.cargo"
|
||||
ynh_secure_remove --file="$install_dir/api/.rustup"
|
||||
mv target/release/crabfit-api ..
|
||||
ynh_secure_remove --file="$install_dir/api/target"
|
||||
popd
|
||||
}
|
||||
|
||||
function build_frontend
|
||||
{
|
||||
ynh_script_progression --message="Building crabfit frontend..." --weight=1
|
||||
|
||||
pushd $install_dir/frontend
|
||||
# Paths are currently absolute, which breaks having a /api/ path prefix
|
||||
# TODO: MR to the upstream
|
||||
|
@ -50,6 +53,8 @@ function build_frontend
|
|||
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" $nodejs_path/yarn install --production --frozen-lockfile
|
||||
ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" $ynh_npm run build
|
||||
popd
|
||||
|
||||
ynh_secure_remove --file="$install_dir/.cache"
|
||||
}
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue