Small nodejs quality of life improvements
This commit is contained in:
parent
23546d9cd2
commit
a28c27e3c4
3 changed files with 8 additions and 1 deletions
|
@ -7,6 +7,7 @@ StartLimitBurst=5
|
|||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/systemctl restart __APP__-nodejs.service
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
|
@ -11,6 +11,7 @@ StandardOutput=append:/var/log/__APP__-nodejs.log
|
|||
StandardError=inherit
|
||||
Environment=__YNH_NODE_LOAD_PATH__
|
||||
Environment=PORT=__PORT__
|
||||
Environment=NODE_ENV=production
|
||||
ExecStartPre=__YNH_NPM__ install
|
||||
ExecStartPre=__YNH_NPM__ run build
|
||||
ExecStart=__YNH_NPM__ run start
|
||||
|
|
|
@ -99,13 +99,18 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX AND PHP-FPM
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..."
|
||||
ynh_script_progression --message="Reloading NGINX and the server..."
|
||||
|
||||
if [ $phpversion != "none" ]
|
||||
then
|
||||
ynh_systemd_action --service_name=php${phpversion}-fpm --action=reload
|
||||
fi
|
||||
|
||||
if [ $nodeversion != "none" ]
|
||||
then
|
||||
ynh_systemd_action --service_name=$app-nodejs --action=reload
|
||||
fi
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue