1
0
Fork 0
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:
ericgaspar 2021-05-27 13:16:05 +02:00
parent fc62d35d17
commit 61ab9e14cd
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 12 additions and 13 deletions

View file

@ -1,9 +1,9 @@
;; Test complet ;; Test complet
; Manifest ; Manifest
domain="domain.tld" (DOMAIN) domain="domain.tld"
path="/path" (PATH) path="/path"
admin="john" (USER) admin="john"
is_public=1 (PUBLIC|public=1|private=0) is_public=1
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=1 setup_sub_dir=1

View file

@ -10,7 +10,7 @@ Group=__APP__
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
Environment="PATH=__ENV_PATH__" Environment="PATH=__ENV_PATH__"
Environment="NODE_ENV=production" Environment="NODE_ENV=production"
ExecStart=__YNH_NPM__ run dev ExecStart=__YNH_NPM__ run
Restart=always Restart=always
PrivateTmp=true PrivateTmp=true
PrivateDevices=true PrivateDevices=true

View file

@ -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_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="__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="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
ynh_add_systemd_config ynh_add_systemd_config

View file

@ -112,10 +112,9 @@ then
ynh_script_progression --message="Building Luckysheet... (this will take some time and resources!)" --weight=20 ynh_script_progression --message="Building Luckysheet... (this will take some time and resources!)" --weight=20
pushd "$final_path" || ynh_die pushd "$final_path" || ynh_die
ynh_use_nodejs
ynh_use_nodejs ynh_npm install
ynh_npm install ynh_npm install gulp -g
ynh_npm install gulp -g
popd || ynh_die popd || ynh_die
fi fi
@ -124,8 +123,8 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=2 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="__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="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config