From bca4da260d3593177f03221383cb30bf083a9182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 00:22:49 +0200 Subject: [PATCH] try to fix v6 --- conf/secrets.yml | 66 +++++++++++++++++++++++----------------------- scripts/_common.sh | 10 +++---- 2 files changed, 37 insertions(+), 39 deletions(-) diff --git a/conf/secrets.yml b/conf/secrets.yml index d3006f4..36e4da1 100644 --- a/conf/secrets.yml +++ b/conf/secrets.yml @@ -1,42 +1,42 @@ production: - # secret_key_base: '__SECRET_KEY_BASE__' - # default_host: '__DOMAIN__' - # default_protocol: 'https' - # delivery_method: 'smtp' - # smtp_address: 'localhost' - # smtp_port: 25 - # smtp_user_name: '__APP__' - # smtp_password: '__MAIL_PWD__' - # time_zone: 'Paris' + secret_key_base: '__SECRET_KEY_BASE__' + default_host: '__DOMAIN__' + default_protocol: 'https' + delivery_method: 'smtp' + smtp_address: 'localhost' + smtp_port: 25 + smtp_user_name: '__APP__' + smtp_password: '__MAIL_PWD__' + time_zone: 'Paris' smtp_authentication: 'none' - # smtp_enable_starttls_auto: false - # smtp_openssl_verify_mode: - # smtp_tls: false + smtp_enable_starttls_auto: false + smtp_openssl_verify_mode: + smtp_tls: false smtp_ca_file: smtp_ca_path: - # week_starting_day: 'monday' - # d3_date_format: '%y-%m-%d' - # uib_date_format: 'dd/MM/yyyy' - # excel_date_format: 'dd/mm/yyyy' - # rails_locale: 'fr' - # app_locale: 'fr' - # moment_locale: 'fr' - # summernote_locale: 'fr-FR' - # angular_locale: 'fr-fr' - # intl_locale: 'fr-FR' - # intl_currency: 'EUR' - # fullcalendar_locale: 'fr' + week_starting_day: 'monday' + d3_date_format: '%y-%m-%d' + uib_date_format: 'dd/MM/yyyy' + excel_date_format: 'dd/mm/yyyy' + rails_locale: 'fr' + app_locale: 'fr' + moment_locale: 'fr' + summernote_locale: 'fr-FR' + angular_locale: 'fr-fr' + intl_locale: 'fr-FR' + intl_currency: 'EUR' + fullcalendar_locale: 'fr' postgresql_language_analyzer: 'simple' - # openlab_base_uri: 'https://openprojects.fab-manager.com' - # openlab_ssl_verify: true + openlab_base_uri: 'https://openprojects.fab-manager.com' + openlab_ssl_verify: true openlab_ssl_verify_peer: true navinum_api_login: navinum_api_password: - # elaticsearch_host: localhost - # max_image_size: 10485760 - # max_cao_size: 20971520 - # max_import_size: 5242880 + elaticsearch_host: localhost + max_image_size: 10485760 + max_cao_size: 20971520 + max_import_size: 5242880 max_proof_of_identity_file_size: - # disk_space_mb_alert: 1024 - # adminsys_email: '__ADMIN_MAIL__' - # allow_insecure_http: false + disk_space_mb_alert: 1024 + adminsys_email: '__ADMIN_MAIL__' + allow_insecure_http: false diff --git a/scripts/_common.sh b/scripts/_common.sh index dfd6bf2..c8c93ef 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -26,7 +26,7 @@ fi #================================================= env_ruby() { - ynh_exec_as "$app" "$ynh_ruby_load_path" env RAILS_ENV=production "$@" + ynh_exec_as "$app" "$ynh_ruby_load_path" env "$@" } @@ -49,9 +49,7 @@ fabmanager_build_ui() { pushd "$install_dir" ynh_use_nodejs ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install - #env_ruby yarn install - #env_ruby bin/webpack - env_ruby bin/bundle exec rails assets:precompile + env_ruby bash -c "source '$install_dir/.env' ; RAILS_ENV=production bin/bundle exec rake assets:precompile" ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean --all popd } @@ -59,14 +57,14 @@ fabmanager_build_ui() { fabmanager_seed_db() { pushd "$install_dir" ynh_replace_string --match_string="DateTime.current" --replace_string="DateTime.current - 1.days" --target_file="$install_dir/db/seeds.rb" - env_ruby bin/bundle exec rails db:seed ADMIN_EMAIL="$admin_mail" ADMIN_PASSWORD="$password" + env_ruby bin/bundle exec rails db:seed RAILS_ENV=production ADMIN_EMAIL="$admin_mail" ADMIN_PASSWORD="$password" popd } fabmanager_migrate_db() { pushd "$install_dir" ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH SUPERUSER;" - env_ruby bin/bundle exec rails db:migrate + env_ruby bin/bundle exec rails db:migrate RAILS_ENV=production ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" popd }