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

Move from secrets.yml to .env

This commit is contained in:
Salamandar 2024-06-28 11:10:11 +02:00
parent 5eb88f1374
commit 3a129688ee
3 changed files with 117 additions and 38 deletions

76
conf/dot_env Normal file
View file

@ -0,0 +1,76 @@
# Add application configuration variables here, as shown below.
# This file is read by dotenv
# Databases
POSTGRES_HOST=localhost
POSTGRES_PASSWORD=__DB_PWD__
REDIS_HOST=localhost
ELASTICSEARCH_HOST=localhost
SECRET_KEY_BASE=__SECRET_KEY_BASE__
# Stripe keys for tests
STRIPE_API_KEY=
STRIPE_PUBLISHABLE_KEY=
# oAuth SSO keys for tests
OAUTH_CLIENT_ID=github-oauth-app-id
OAUTH_CLIENT_SECRET=github-oauth-app-secret
OIDC_CLIENT_ID=oidc-client-id
OIDC_CLIENT_SECRET=oidc-client-secret
# Configure carefully!
DEFAULT_HOST=__DOMAIN__
DEFAULT_PROTOCOL=https
# Email config
DELIVERY_METHOD=smtp
SMTP_ADDRESS=localhost
SMTP_PORT=25
SMTP_USER_NAME=__APP__
SMTP_PASSWORD=__MAIL_PWD__
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=false
SMTP_OPENSSL_VERIFY_MODE=
SMTP_TLS=false
# I18N configuration
RAILS_LOCALE=fr
APP_LOCALE=fr
MOMENT_LOCALE=fr
SUMMERNOTE_LOCALE=fr-FR
ANGULAR_LOCALE=fr-fr
FULLCALENDAR_LOCALE=fr
INTL_LOCALE=fr-FR
INTL_CURRENCY=EUR
FORCE_VERSION_CHECK=false
ALLOW_INSECURE_HTTP=false
POSTGRESQL_LANGUAGE_ANALYZER=french
TIME_ZONE=Paris
WEEK_STARTING_DAY=monday
D3_DATE_FORMAT=%d/%m/%y
UIB_DATE_FORMAT=dd/MM/yyyy
EXCEL_DATE_FORMAT=dd/mm/yyyy
# OpenLab Projects
# do not change this URL
OPENLAB_BASE_URI=https://openprojects.fab-manager.com
OPENLAB_SSL_VERIFY=true
# System settings
LOG_LEVEL=debug
RAILS_LOG_TO_STDOUT=true
DISK_SPACE_MB_ALERT=1024
ADMINSYS_EMAIL=__ADMIN_MAIL__
ENABLE_SENTRY=false
# 5242880 = 5 megabytes
MAX_IMPORT_SIZE=5242880
# 10485760 = 10 megabytes
MAX_IMAGE_SIZE=10485760
# 20971520 = 20 megabytes
MAX_CAO_SIZE=20971520
# 5242880 = 5 megabytes
MAX_SUPPORTING_DOCUMENT_FILE_SIZE=5242880

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

@ -55,9 +55,13 @@ chown -R "$app:www-data" "$data_dir"
#=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="secrets.yml" --destination="$install_dir/config/secrets.yml"
chmod 400 "$install_dir/config/secrets.yml"
chown "$app:$app" "$install_dir/config/secrets.yml"
# ynh_add_config --template="secrets.yml" --destination="$install_dir/config/secrets.yml"
# chmod 400 "$install_dir/config/secrets.yml"
# chown "$app:$app" "$install_dir/config/secrets.yml"
ynh_add_config --template="dot_env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown "$app:$app" "$install_dir/.env"
ynh_add_config --template="database.yml" --destination="$install_dir/config/database.yml"
chmod 400 "$install_dir/config/database.yml"
@ -69,12 +73,11 @@ chown "$app:$app" "$install_dir/config/database.yml"
ynh_script_progression --message="Building app..." --weight=7
fabmanager_build_ruby
fabmanager_build_ui
fabmanager_migrate_db
fabmanager_seed_db
fabmanager_build_ui
ynh_secure_remove --file="$install_dir/.cache"
#=================================================