mirror of
https://github.com/YunoHost-Apps/luckysheet_ynh.git
synced 2024-09-03 19:36:21 +02:00
Run app as production
This commit is contained in:
parent
fc62d35d17
commit
61ab9e14cd
4 changed files with 12 additions and 13 deletions
|
@ -1,9 +1,9 @@
|
|||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
admin="john" (USER)
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
admin="john"
|
||||
is_public=1
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
|
|
@ -10,7 +10,7 @@ Group=__APP__
|
|||
WorkingDirectory=__FINALPATH__
|
||||
Environment="PATH=__ENV_PATH__"
|
||||
Environment="NODE_ENV=production"
|
||||
ExecStart=__YNH_NPM__ run dev
|
||||
ExecStart=__YNH_NPM__ run
|
||||
Restart=always
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
|
|
|
@ -118,8 +118,8 @@ cp ../conf/config.example.js $final_path/src/config.js
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||
|
||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
||||
|
||||
ynh_add_systemd_config
|
||||
|
||||
|
|
|
@ -112,10 +112,9 @@ then
|
|||
ynh_script_progression --message="Building Luckysheet... (this will take some time and resources!)" --weight=20
|
||||
|
||||
pushd "$final_path" || ynh_die
|
||||
|
||||
ynh_use_nodejs
|
||||
ynh_npm install
|
||||
ynh_npm install gulp -g
|
||||
ynh_use_nodejs
|
||||
ynh_npm install
|
||||
ynh_npm install gulp -g
|
||||
popd || ynh_die
|
||||
fi
|
||||
|
||||
|
@ -124,8 +123,8 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring a systemd service..." --weight=2
|
||||
|
||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
|
||||
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
|
||||
|
||||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
|
Loading…
Reference in a new issue