From c2e6b04c87b41a8d4bc4d36bc48d27e98bda0e8a Mon Sep 17 00:00:00 2001 From: Gredin67 Date: Tue, 27 Feb 2024 10:50:22 +0100 Subject: [PATCH] Update install --- scripts/install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/install b/scripts/install index f28612c..1c83f0e 100755 --- a/scripts/install +++ b/scripts/install @@ -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"