1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wetty_ynh.git synced 2024-09-03 18:16:29 +02:00

Local build, to be sure of which version we use

This commit is contained in:
Salamandar 2021-02-07 12:20:53 +01:00
parent 6ae08c0764
commit e6f4eb3d1c
4 changed files with 16 additions and 6 deletions

View file

@ -6,10 +6,16 @@ After=network.target
Type=simple Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/
Environment=NODE_ENV=production Environment=NODE_ENV=production
Environment="__YNH_NODE_LOAD_PATH__" Environment="__YNH_NODE_LOAD_PATH__"
ExecStart=__YARN_BIN_DIR__/wetty --conf __FINALPATH__/config.json5
WorkingDirectory=__FINALPATH__
ExecStart=node . --conf ./config.json5
TimeoutStopSec=20
KillMode=mixed
Restart=always
RestartSec=2
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -9,8 +9,6 @@
YNH_NODEJS_VERSION=14 YNH_NODEJS_VERSION=14
YARN_APP_REAL_VERSION=2.0.2
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================

View file

@ -111,7 +111,10 @@ chown -R "$app":"$app" "$final_path"
pushd "$final_path" || return 1 pushd "$final_path" || return 1
ynh_use_nodejs ; set "${ynh_node_load_PATH:?}" ynh_use_nodejs ; set "${ynh_node_load_PATH:?}"
sudo -u "$app" env "$ynh_node_load_PATH" yarn global add wetty@"$YARN_APP_REAL_VERSION" sudo -u "$app" env "$ynh_node_load_PATH" yarn
sudo -u "$app" env "$ynh_node_load_PATH" yarn build
sudo -u "$app" env "$ynh_node_load_PATH" yarn install --production --ignore-scripts --prefer-offline
yarn_bin_dir="$(sudo -u "$app" env "$ynh_node_load_PATH" yarn global bin)" yarn_bin_dir="$(sudo -u "$app" env "$ynh_node_load_PATH" yarn global bin)"
popd || return 1 popd || return 1

View file

@ -122,7 +122,10 @@ chown -R "$app":"$app" "$final_path"
pushd "$final_path" || return 1 pushd "$final_path" || return 1
ynh_use_nodejs ; set "${ynh_node_load_PATH:?}" ynh_use_nodejs ; set "${ynh_node_load_PATH:?}"
sudo -u "$app" env "$ynh_node_load_PATH" yarn global add wetty@"$YARN_APP_REAL_VERSION" sudo -u "$app" env "$ynh_node_load_PATH" yarn
sudo -u "$app" env "$ynh_node_load_PATH" yarn build
sudo -u "$app" env "$ynh_node_load_PATH" yarn install --production --ignore-scripts --prefer-offline
yarn_bin_dir="$(sudo -u "$app" env "$ynh_node_load_PATH" yarn global bin)" yarn_bin_dir="$(sudo -u "$app" env "$ynh_node_load_PATH" yarn global bin)"
popd || return 1 popd || return 1