aboutsummaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/install')
-rw-r--r--scripts/install6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/install b/scripts/install
index cbce4e3..90a8dfc 100644
--- a/scripts/install
+++ b/scripts/install
@@ -124,8 +124,10 @@ ynh_install_app_dependencies \
ynh_psql_test_if_first_run
db_user=$(ynh_sanitize_dbid "$app")
-db_name=$(ynh_sanitize_dbid "$app")
+db_name="${app}_production"
+db_name=$(ynh_sanitize_dbid "$db_name")
db_pwd=$(ynh_string_random)
+ynh_app_setting_set $app db_name $db_name
ynh_app_setting_set $app db_pwd $db_pwd
ynh_psql_setup_db "$db_user" "$db_name" "$db_pwd"
@@ -220,7 +222,7 @@ sed -i "s@#SMTP_OPENSSL_VERIFY_MODE=peer@SMTP_OPENSSL_VERIFY_MODE=none@g" "${fin
$final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet
yarn install --production --no-progress --non-interactive --silent
echo "SAFETY_ASSURED=1">> .env.production
- RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet
+ RAILS_ENV=production $final_path/live/bin/bundle exec rails db:setup --quiet
RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
INSTALL
)