diff --git a/conf/systemd.service b/conf/systemd.service index 64bc054..84a727d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,6 +8,7 @@ Restart=always User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ +Environment="NODE_ENV=production" ExecStart=__YNH_NODE__ server/server.js --port=__PORT__ StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit diff --git a/scripts/install b/scripts/install index e820352..a2d58f7 100755 --- a/scripts/install +++ b/scripts/install @@ -53,7 +53,7 @@ ynh_script_progression --message="Installing Uptime Kuma dependencies..." --weig pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --production popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 13e842b..499980e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -66,7 +66,7 @@ ynh_script_progression --message="Upgrading Uptime Kuma dependencies..." --weigh pushd "$install_dir" ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install + ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --production popd #=================================================