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

Update install

This commit is contained in:
Gredin67 2024-02-27 10:50:22 +01:00 committed by GitHub
parent 7d11294143
commit c2e6b04c87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,6 +63,14 @@ ynh_add_config --template="env.example" --destination="$install_dir/config/env"
chmod 400 "$install_dir/config/env"
chown $app:$app "$install_dir/config/env"
ynh_add_config --template="env.example" --destination="$install_dir/config/.env"
chmod 400 "$install_dir/config/.env"
chown $app:$app "$install_dir/config/.env"
ynh_add_config --template="env.example" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
#=================================================
# BUILD APP
#=================================================
@ -78,6 +86,8 @@ pushd $install_dir
ynh_use_nodejs
ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH yarn install
export DEFAULT_HOST=$domain
ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rake --trace fablab:setup:env_to_db
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH SUPERUSER;" --database="$db_name"
ynh_exec_warn_less ynh_exec_as $app env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rake --trace db:migrate
ynh_psql_execute_as_root --sql="ALTER USER $db_user WITH NOSUPERUSER;" --database="$db_name"