mirror of
https://github.com/YunoHost-Apps/tooljet_ynh.git
synced 2024-10-01 13:34:55 +02:00
wip
This commit is contained in:
parent
c4c1720adf
commit
72173a0bef
3 changed files with 42 additions and 13 deletions
|
@ -7,7 +7,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
Environment="__NODE_ENV_PATH__"
|
||||
Environment="__YNH_NODE_LOAD_PATH__"
|
||||
ExecStart=__YNH_NPM_ start:prod
|
||||
StandardOutput=append:/var/log/__APP__/__APP__.log
|
||||
StandardError=inherit
|
||||
|
|
|
@ -123,22 +123,18 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# BUILD THE APPLICATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building ToolJet..." --time --weight=1
|
||||
ynh_script_progression --message="Building ToolJet..." --time --weight=10
|
||||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install npm@7.20.0
|
||||
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install -f
|
||||
# The version shipped by default with n does not work, there is a
|
||||
# wierd dependency issue about unsupported platform and fsevent.
|
||||
# See https://github.com/ToolJet/ToolJet/pull/1752
|
||||
$ynh_npm install -g npm@7.20.0
|
||||
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix plugins -f
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix server -f
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install --prefix frontend -f
|
||||
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build
|
||||
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run db:create
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run db:migrate
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install -f
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
@ -159,6 +155,16 @@ ynh_add_config --template=".env.example" --destination="$final_path/.env"
|
|||
chmod 400 "$final_path/.env"
|
||||
chown $app:$app "$final_path/.env"
|
||||
|
||||
#=================================================
|
||||
# BUILD THE DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building ToolJet database..." --time --weight=1
|
||||
|
||||
pushd $final_path
|
||||
# Build the database once the configuration is set
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run db:migrate
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
|
@ -107,8 +107,21 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# ...
|
||||
# BUILD THE APPLICATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building ToolJet..." --time --weight=10
|
||||
|
||||
pushd $final_path
|
||||
ynh_use_nodejs
|
||||
|
||||
# The version shipped by default with n does not work, there is a
|
||||
# wierd dependency issue about unsupported platform and fsevent.
|
||||
# See https://github.com/ToolJet/ToolJet/pull/1752
|
||||
$ynh_npm install -g npm@7.20.0
|
||||
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install -f
|
||||
ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run build
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
|
@ -120,6 +133,16 @@ ynh_add_config --template=".env.example" --destination="$final_path/.env"
|
|||
chmod 400 "$final_path/.env"
|
||||
chown $app:$app "$final_path/.env"
|
||||
|
||||
#=================================================
|
||||
# BUILD THE DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building ToolJet database..." --time --weight=1
|
||||
|
||||
pushd $final_path
|
||||
# Build the database once the configuration is set
|
||||
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm run db:migrate
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue