mirror of
https://github.com/YunoHost-Apps/chatgpt-web_ynh.git
synced 2024-09-03 18:16:21 +02:00
fix
This commit is contained in:
parent
6daf859bdd
commit
4fa44be267
4 changed files with 27 additions and 6 deletions
|
@ -9,7 +9,7 @@ Group=__APP__
|
|||
WorkingDirectory=__INSTALL_DIR__/
|
||||
Environment="PATH=__ENV_PATH__"
|
||||
Environment="NODE_ENV=production"
|
||||
ExecStart=__YNH_NPM__ start
|
||||
ExecStart=__YNH_NPM__ run build
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
StartLimitInterval=60s
|
||||
|
|
|
@ -36,6 +36,12 @@ ynh_script_progression --message="Adding system configurations related to $app..
|
|||
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||||
ynh_add_nginx_config
|
||||
|
||||
# Create a dedicated systemd config
|
||||
env_path="$PATH"
|
||||
ynh_add_systemd_config
|
||||
|
||||
yunohost service add $app --description="ChatGPT web interface" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# APP INITIAL CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -58,9 +64,17 @@ ynh_script_progression --message="Building app... (this will take some time and
|
|||
pushd "$install_dir"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm ci
|
||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm run build
|
||||
#ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm run build
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -31,7 +31,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|||
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
|
||||
systemctl enable $app.service --quiet
|
||||
|
||||
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --description="ChatGPT web interface" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -29,7 +29,7 @@ then
|
|||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir"
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep = ".env"
|
||||
fi
|
||||
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
@ -41,9 +41,16 @@ ynh_script_progression --message="Upgrading system configurations related to $ap
|
|||
|
||||
ynh_add_nginx_config
|
||||
|
||||
env_path="$PATH"
|
||||
ynh_add_systemd_config
|
||||
|
||||
yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log"
|
||||
yunohost service add $app --description="ChatGPT web interface" --log="/var/log/$app/$app.log"
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_use_nodejs
|
||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm ci
|
||||
#ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm run build
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
Loading…
Reference in a new issue