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

try to fix v6

This commit is contained in:
Salamandar 2024-06-30 00:22:49 +02:00
parent 6c50a3cc7b
commit bca4da260d
2 changed files with 37 additions and 39 deletions

View file

@ -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

View file

@ -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
}