1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/thelounge_ynh.git synced 2024-09-03 20:35:54 +02:00
This commit is contained in:
ericgaspar 2021-08-30 09:19:20 +02:00
parent 5bcca1c3cc
commit 4f338dec79
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 13 additions and 5 deletions

View file

@ -10,7 +10,8 @@ WorkingDirectory=__FINALPATH__/
Environment="PATH=__ENV_PATH__"
Environment="THELOUNGE_HOME=/home/yunohost.app/__APP__/"
Environment="NODE_ENV=production"
ExecStart=/usr/bin/yarn start
#ExecStart=/usr/bin/yarn start
ExecStart=__FINALPATH__/ start
Restart=on-failure
RestartSec=5
StartLimitInterval=60s

View file

@ -105,7 +105,6 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Creating a data directory..."
datadir=/home/yunohost.app/$app
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
@ -122,18 +121,26 @@ chown -R $app:www-data "$datadir"
#=================================================
ynh_script_progression --message="Modifying a config file..."
ynh_add_config --template="../conf/config-dist.js" --destination="$config_path/config.js"
ynh_add_config --template="../conf/config.js" --destination="$config_path/config.js"
#=================================================
# INSTALL THE LOUNGE
#=================================================
ynh_script_progression --message="Installing The Lounge..."
# pushd $final_path
# ynh_use_nodejs
# ynh_exec_warn_less NODE_ENV=production yarn install
# yarn add webpack webpack-dev-server --dev
# ynh_exec_warn_less NODE_ENV=production yarn build
# popd
pushd $final_path
ynh_use_nodejs
ynh_exec_warn_less NODE_ENV=production yarn install
ynh_exec_warn_less ynh_exec_as $app yarn install
yarn add webpack webpack-dev-server --dev
ynh_exec_warn_less NODE_ENV=production yarn build
ynh_exec_warn_less ynh_exec_as $app NODE_ENV=production yarn build
ynh_exec_warn_less ynh_exec_as $app yarn link
popd
#=================================================