From 44d1fbe09e036ea7ea56be36e8773f4e13eedc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 14 Mar 2024 19:06:40 +0100 Subject: [PATCH 01/40] Bump version, add email config, remove supervisor code - from eric_g --- manifest.toml | 8 +++++--- scripts/_common.sh | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/manifest.toml b/manifest.toml index 7192848..e92e144 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Fab-manager" description.en = "Fab Lab management solution" description.fr = "Solution de gestion de Fab Lab" -version = "5.6.5~ynh2" +version = "6.3.9~ynh1" maintainers = [] @@ -22,8 +22,10 @@ code = "https://github.com/sleede/fab-manager" yunohost = ">= 11.2.12" architectures = "all" multi_instance = false + ldap = false sso = false + disk = "50M" ram.build = "50M" ram.runtime = "50M" @@ -46,8 +48,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://api.github.com/repos/sleede/fab-manager/tarball/v5.6.5" - sha256 = "dc6ae9fefd893975ee2b70c5b327a37b3d585dcf223ddffe75cc0b570771102d" + url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.9.tar.gz" + sha256 = "b6a68bf91009678a3a666cfd5cab8e3c636ac9fbb920e3e4e4bd29b093c7f43d" autoupdate.strategy = "latest_github_tag" diff --git a/scripts/_common.sh b/scripts/_common.sh index 375c5cf..9c96708 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,10 +4,9 @@ # COMMON VARIABLES #================================================= -ruby_version="2.6.10" -bundler_version=2.1.4 +ruby_version="3.1" -nodejs_version="14" +nodejs_version="18" # Workaround for Mastodon on Bullseye # See https://github.com/mastodon/mastodon/issues/15751#issuecomment-873594463 From af0f897d227cba332d3320590771fb2f52c8fe61 Mon Sep 17 00:00:00 2001 From: Gredin67 Date: Tue, 27 Feb 2024 09:19:17 +0100 Subject: [PATCH 02/40] remove fetch settings at build --- conf/secrets.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/secrets.yml b/conf/secrets.yml index bdc877a..36e4da1 100644 --- a/conf/secrets.yml +++ b/conf/secrets.yml @@ -40,4 +40,3 @@ production: disk_space_mb_alert: 1024 adminsys_email: '__ADMIN_MAIL__' allow_insecure_http: false - locked_settings: <%= ENV.fetch("LOCKED_SETTINGS", 'uuid,origin').split(/,/) %> From 118d200ae79092dd58834d1490f1e26c39f37e5b Mon Sep 17 00:00:00 2001 From: Gredin67 Date: Mon, 26 Feb 2024 10:09:18 +0100 Subject: [PATCH 03/40] ruby 3.2.2 nodejs 18.15 see https://github.com/sleede/fab-manager/blob/master/CHANGELOG.md --- scripts/_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 9c96708..e22f7bc 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,9 @@ # COMMON VARIABLES #================================================= -ruby_version="3.1" +ruby_version="3.2.2" -nodejs_version="18" +nodejs_version="18.15" # Workaround for Mastodon on Bullseye # See https://github.com/mastodon/mastodon/issues/15751#issuecomment-873594463 From 84b93eecda719e00b44b4e1114a3e37025e15103 Mon Sep 17 00:00:00 2001 From: Gredin67 Date: Wed, 27 Mar 2024 11:14:37 +0100 Subject: [PATCH 04/40] ffi and yaml deps --- manifest.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifest.toml b/manifest.toml index e92e144..14387cf 100644 --- a/manifest.toml +++ b/manifest.toml @@ -85,6 +85,8 @@ ram.runtime = "50M" # For Ruby "libjemalloc-dev", + "libffi-dev", + "libyaml-dev", "curl", "build-essential", "libreadline-dev", From a3ce6c0ef1b747aba25e19d65adbdd570e540551 Mon Sep 17 00:00:00 2001 From: Gredin67 Date: Thu, 28 Mar 2024 00:24:18 +0100 Subject: [PATCH 05/40] bundler_version locked_settings --- conf/secrets.yml | 1 + scripts/_common.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/secrets.yml b/conf/secrets.yml index 36e4da1..eb32e20 100644 --- a/conf/secrets.yml +++ b/conf/secrets.yml @@ -40,3 +40,4 @@ production: disk_space_mb_alert: 1024 adminsys_email: '__ADMIN_MAIL__' allow_insecure_http: false + locked_settings: <%= ENV.fetch("LOCKED_SETTINGS", 'uuid,origin').split(/,/) %> \ No newline at end of file diff --git a/scripts/_common.sh b/scripts/_common.sh index e22f7bc..c0e3ace 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= ruby_version="3.2.2" - +bundler_version=2.1.4 nodejs_version="18.15" # Workaround for Mastodon on Bullseye From 11f6f7026d65f74a1f0fa100c53454f4fdf41e3f Mon Sep 17 00:00:00 2001 From: Gredin67 Date: Thu, 28 Mar 2024 01:04:33 +0100 Subject: [PATCH 06/40] locked_settings --- conf/secrets.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/secrets.yml b/conf/secrets.yml index eb32e20..36e4da1 100644 --- a/conf/secrets.yml +++ b/conf/secrets.yml @@ -40,4 +40,3 @@ production: disk_space_mb_alert: 1024 adminsys_email: '__ADMIN_MAIL__' allow_insecure_http: false - locked_settings: <%= ENV.fetch("LOCKED_SETTINGS", 'uuid,origin').split(/,/) %> \ No newline at end of file From 23d7f7992232af9a007ccbafa9f26a1e8f063c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 May 2024 08:27:58 +0200 Subject: [PATCH 07/40] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 14387cf..dae3160 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Fab-manager" description.en = "Fab Lab management solution" description.fr = "Solution de gestion de Fab Lab" -version = "6.3.9~ynh1" +version = "6.3.22~ynh1" maintainers = [] @@ -48,8 +48,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.9.tar.gz" - sha256 = "b6a68bf91009678a3a666cfd5cab8e3c636ac9fbb920e3e4e4bd29b093c7f43d" + url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.22.tar.gz" + sha256 = "5ba874b2c9a80c80dcea2af51d8e8ece3fbacd43de3f359bea8f6612194b62c4" autoupdate.strategy = "latest_github_tag" From cc3a4652e185fd82da66306a84704878bdda0ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 May 2024 08:29:07 +0200 Subject: [PATCH 08/40] Update _common.sh --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c0e3ace..eca3b21 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ ruby_version="3.2.2" bundler_version=2.1.4 -nodejs_version="18.15" +nodejs_version="18" # Workaround for Mastodon on Bullseye # See https://github.com/mastodon/mastodon/issues/15751#issuecomment-873594463 From a3106fff94da73bc92b8a3335f9e2ea6d838482e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 10:40:07 +0200 Subject: [PATCH 09/40] reorg _common.sh --- scripts/_common.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index eca3b21..e7573b8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -37,6 +37,17 @@ fabmanager_build_ruby() { popd } +fabmanager_build_ui() { + pushd "$install_dir" + ynh_use_nodejs + ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install + #ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload yarn install + #ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/webpack + ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/bundle exec rake assets:precompile + ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean --all + popd +} + 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" @@ -53,17 +64,6 @@ fabmanager_migrate_db() { popd } -fabmanager_build_ui() { - pushd "$install_dir" - ynh_use_nodejs - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install - #ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload yarn install - #ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/webpack - ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/bundle exec rake assets:precompile - ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean --all - popd -} - #================================================= # EXPERIMENTAL HELPERS From 32af6e665b5ea9c059c38c4073e3e72d2c5f7383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 10:40:32 +0200 Subject: [PATCH 10/40] build ruby with ynh_exec_as --- scripts/_common.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index e7573b8..e3f56d2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -29,11 +29,11 @@ fi fabmanager_build_ruby() { pushd "$install_dir" ynh_use_ruby - ynh_exec_warn_less $ynh_gem install "bundler:$bundler_version" - ynh_exec_warn_less bin/bundle config --global frozen 1 - ynh_exec_warn_less bin/bundle config set --local without 'development test doc' - ynh_exec_warn_less bin/bundle install - ynh_exec_warn_less bin/bundle binstubs --all + ynh_exec_warn_less ynh_exec_as "$app" $ynh_gem install "bundler:$bundler_version" + ynh_exec_warn_less ynh_exec_as "$app" bin/bundle config --global frozen 1 + ynh_exec_warn_less ynh_exec_as "$app" bin/bundle config set --local without 'development test doc' + ynh_exec_warn_less ynh_exec_as "$app" bin/bundle install + ynh_exec_warn_less ynh_exec_as "$app" bin/bundle binstubs --all popd } From cf66e1ab446e9e4e7935ffa673e585ffaa6af55a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 10:40:46 +0200 Subject: [PATCH 11/40] use rails instead of rake --- scripts/_common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index e3f56d2..d7af0ee 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -43,7 +43,7 @@ fabmanager_build_ui() { ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install #ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload yarn install #ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/webpack - ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/bundle exec rake assets:precompile + ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/bundle exec rails assets:precompile ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean --all popd } @@ -52,14 +52,14 @@ 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" ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload \ - bin/bundle exec rake db:seed ADMIN_EMAIL="$admin_mail" ADMIN_PASSWORD="$password" + bin/bundle exec rails db:seed 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;" - ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/bundle exec rake db:migrate + ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/bundle exec rails db:migrate ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" popd } From 725a95aaf763ac5de6cb99574550b7f3b09790bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 10:41:25 +0200 Subject: [PATCH 12/40] Install latest bundler --- scripts/_common.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d7af0ee..e69bf70 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,6 @@ #================================================= ruby_version="3.2.2" -bundler_version=2.1.4 nodejs_version="18" # Workaround for Mastodon on Bullseye @@ -29,7 +28,7 @@ fi fabmanager_build_ruby() { pushd "$install_dir" ynh_use_ruby - ynh_exec_warn_less ynh_exec_as "$app" $ynh_gem install "bundler:$bundler_version" + ynh_exec_warn_less ynh_exec_as "$app" $ynh_gem install bundler ynh_exec_warn_less ynh_exec_as "$app" bin/bundle config --global frozen 1 ynh_exec_warn_less ynh_exec_as "$app" bin/bundle config set --local without 'development test doc' ynh_exec_warn_less ynh_exec_as "$app" bin/bundle install From 5eb88f13745ac22a0f667ab84bbd644ed0115248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 10:43:27 +0200 Subject: [PATCH 13/40] More straightforward bindle install --- scripts/_common.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index e69bf70..f1a2444 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -30,9 +30,7 @@ fabmanager_build_ruby() { ynh_use_ruby ynh_exec_warn_less ynh_exec_as "$app" $ynh_gem install bundler ynh_exec_warn_less ynh_exec_as "$app" bin/bundle config --global frozen 1 - ynh_exec_warn_less ynh_exec_as "$app" bin/bundle config set --local without 'development test doc' - ynh_exec_warn_less ynh_exec_as "$app" bin/bundle install - ynh_exec_warn_less ynh_exec_as "$app" bin/bundle binstubs --all + ynh_exec_warn_less ynh_exec_as "$app" bin/bundle install --binstubs --without 'development test doc' popd } From 3a129688ee761688fe619d16c42bfae036d21cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 11:10:11 +0200 Subject: [PATCH 14/40] Move from secrets.yml to .env --- conf/dot_env | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ conf/secrets.yml | 66 ++++++++++++++++++++--------------------- scripts/install | 13 +++++---- 3 files changed, 117 insertions(+), 38 deletions(-) create mode 100644 conf/dot_env diff --git a/conf/dot_env b/conf/dot_env new file mode 100644 index 0000000..2f94fc1 --- /dev/null +++ b/conf/dot_env @@ -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 diff --git a/conf/secrets.yml b/conf/secrets.yml index 36e4da1..d3006f4 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/install b/scripts/install index df39714..6265c14 100755 --- a/scripts/install +++ b/scripts/install @@ -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" #================================================= From b335cd54d211e09de5fdc30ec18fa566ca8f55bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 11:15:23 +0200 Subject: [PATCH 15/40] bundler needs to be installed as root --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index f1a2444..f578a9a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -28,7 +28,7 @@ fi fabmanager_build_ruby() { pushd "$install_dir" ynh_use_ruby - ynh_exec_warn_less ynh_exec_as "$app" $ynh_gem install bundler + ynh_exec_warn_less $ynh_gem install bundler ynh_exec_warn_less ynh_exec_as "$app" bin/bundle config --global frozen 1 ynh_exec_warn_less ynh_exec_as "$app" bin/bundle install --binstubs --without 'development test doc' popd From ff8e852b8bc8b394564aaa704fcc2983530cab48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 28 Jun 2024 11:25:49 +0200 Subject: [PATCH 16/40] Fix env to call ruby --- scripts/_common.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index f578a9a..8effd5b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -25,12 +25,17 @@ fi # PERSONAL HELPERS #================================================= +env_ruby() { + ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" "$@" +} + + fabmanager_build_ruby() { pushd "$install_dir" ynh_use_ruby ynh_exec_warn_less $ynh_gem install bundler - ynh_exec_warn_less ynh_exec_as "$app" bin/bundle config --global frozen 1 - ynh_exec_warn_less ynh_exec_as "$app" bin/bundle install --binstubs --without 'development test doc' + env_ruby bin/bundle config --global frozen 1 + env_ruby bin/bundle install --binstubs --without 'development test doc' popd } @@ -38,9 +43,9 @@ fabmanager_build_ui() { pushd "$install_dir" ynh_use_nodejs ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn install - #ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload yarn install - #ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/webpack - ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/bundle exec rails assets:precompile + #env_ruby yarn install + #env_ruby bin/webpack + env_ruby bin/bundle exec rails assets:precompile ynh_exec_warn_less ynh_exec_as "$app" env "$ynh_node_load_PATH" yarn cache clean --all popd } @@ -48,15 +53,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" - ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload \ - bin/bundle exec rails db:seed ADMIN_EMAIL="$admin_mail" ADMIN_PASSWORD="$password" + env_ruby bin/bundle exec rails db:seed 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;" - ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" $ld_preload bin/bundle exec rails db:migrate + env_ruby bin/bundle exec rails db:migrate ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" popd } From 8ad2862d9effd2cbeb44fa7439f5c84f537f9baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 29 Jun 2024 22:39:53 +0200 Subject: [PATCH 17/40] Try to fix bundle install --- scripts/_common.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 8effd5b..1de3bc1 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -26,16 +26,22 @@ fi #================================================= env_ruby() { - ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production "$ynh_ruby_load_path" "$@" + ynh_exec_as "$app" "$ynh_ruby_load_path" env RAILS_ENV=production "$@" } fabmanager_build_ruby() { pushd "$install_dir" ynh_use_ruby - ynh_exec_warn_less $ynh_gem install bundler + ynh_gem update --system --no-document + ynh_gem install bundler rake --no-document + env_ruby bin/bundle config --global frozen 1 - env_ruby bin/bundle install --binstubs --without 'development test doc' + env_ruby bin/bundle config set without 'development test doc' + env_ruby bin/bundle config set path 'vendor/bundle' + env_ruby bin/bundle install + env_ruby bin/bundle binstubs --all + popd } From 6c50a3cc7b09884ccfc06ba2b1d4f973e7acdeb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 29 Jun 2024 22:56:45 +0200 Subject: [PATCH 18/40] fix call to gem --- scripts/_common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1de3bc1..dfd6bf2 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -33,8 +33,8 @@ env_ruby() { fabmanager_build_ruby() { pushd "$install_dir" ynh_use_ruby - ynh_gem update --system --no-document - ynh_gem install bundler rake --no-document + $ynh_gem update --system --no-document + $ynh_gem install bundler rake --no-document env_ruby bin/bundle config --global frozen 1 env_ruby bin/bundle config set without 'development test doc' 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 19/40] 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 } From 1c24a68b2c938d3dd93cae47970ca793b95c7e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 00:51:19 +0200 Subject: [PATCH 20/40] Found out what's wrong, fixed --- scripts/_common.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index c8c93ef..07f04b7 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 "$@" + ynh_exec_as "$app" "$ynh_ruby_load_path" "$@" } @@ -41,7 +41,6 @@ fabmanager_build_ruby() { env_ruby bin/bundle config set path 'vendor/bundle' env_ruby bin/bundle install env_ruby bin/bundle binstubs --all - popd } @@ -49,7 +48,10 @@ 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 bash -c "source '$install_dir/.env' ; RAILS_ENV=production bin/bundle exec rake assets:precompile" + ( + set -a; source "$install_dir/.env"; set +a # Export all variables of .env + env_ruby 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 } @@ -57,14 +59,20 @@ 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 RAILS_ENV=production ADMIN_EMAIL="$admin_mail" ADMIN_PASSWORD="$password" + ( + set -a; source "$install_dir/.env"; set +a # Export all variables of .env + env_ruby RAILS_ENV=production ADMIN_EMAIL="$admin_mail" ADMIN_PASSWORD="$password" bin/bundle exec rails db:seed + ) 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 RAILS_ENV=production + ( + set -a; source "$install_dir/.env"; set +a # Export all variables of .env + env_ruby RAILS_ENV=production bin/bundle exec rails db:migrate + ) ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" popd } From 21b49ccbeb0437604723682d8e64883b1a7d0761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 11:56:10 +0200 Subject: [PATCH 21/40] Actually need to source inside sudo --- scripts/_common.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 07f04b7..cef5ff9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -48,10 +48,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 - ( - set -a; source "$install_dir/.env"; set +a # Export all variables of .env - env_ruby RAILS_ENV=production bin/bundle exec rake assets:precompile - ) + env_ruby bash -c "set -a; source '$install_dir/.env'; set +a ; 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,20 +56,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" - ( - set -a; source "$install_dir/.env"; set +a # Export all variables of .env - env_ruby RAILS_ENV=production ADMIN_EMAIL="$admin_mail" ADMIN_PASSWORD="$password" bin/bundle exec rails db:seed - ) + env_ruby bash -c "set -a; source '$install_dir/.env'; set +a ; RAILS_ENV=production ADMIN_EMAIL='$admin_mail' ADMIN_PASSWORD='$password' bin/bundle exec rails db:seed" popd } fabmanager_migrate_db() { pushd "$install_dir" ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH SUPERUSER;" - ( - set -a; source "$install_dir/.env"; set +a # Export all variables of .env - env_ruby RAILS_ENV=production bin/bundle exec rails db:migrate - ) + env_ruby bash -c "set -a; source '$install_dir/.env'; set +a ; RAILS_ENV=production bin/bundle exec rails db:migrate" ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" popd } From 0aada4d2874e889440d1afcdae8ab2e89dc68b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 13:58:53 +0200 Subject: [PATCH 22/40] Fix db creation: don't call migration but schema load and seed --- scripts/_common.sh | 1 + scripts/install | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index cef5ff9..64c866d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -56,6 +56,7 @@ 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 bash -c "set -a; source '$install_dir/.env'; set +a ; RAILS_ENV=production ADMIN_EMAIL='$admin_mail' ADMIN_PASSWORD='$password' bin/bundle exec rails db:schema:load" env_ruby bash -c "set -a; source '$install_dir/.env'; set +a ; RAILS_ENV=production ADMIN_EMAIL='$admin_mail' ADMIN_PASSWORD='$password' bin/bundle exec rails db:seed" popd } diff --git a/scripts/install b/scripts/install index 6265c14..18acc77 100755 --- a/scripts/install +++ b/scripts/install @@ -75,8 +75,8 @@ ynh_script_progression --message="Building app..." --weight=7 fabmanager_build_ruby fabmanager_build_ui -fabmanager_migrate_db fabmanager_seed_db +# fabmanager_migrate_db ynh_secure_remove --file="$install_dir/.cache" From 6aadeb468352355afd794d5adc6df7efefa4d45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 14:37:55 +0200 Subject: [PATCH 23/40] Fix db install --- scripts/_common.sh | 3 +++ scripts/install | 11 ----------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 64c866d..dff43e5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -56,7 +56,10 @@ 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" + # Need superuser for the extensions configuration… + ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH SUPERUSER;" env_ruby bash -c "set -a; source '$install_dir/.env'; set +a ; RAILS_ENV=production ADMIN_EMAIL='$admin_mail' ADMIN_PASSWORD='$password' bin/bundle exec rails db:schema:load" + ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" env_ruby bash -c "set -a; source '$install_dir/.env'; set +a ; RAILS_ENV=production ADMIN_EMAIL='$admin_mail' ADMIN_PASSWORD='$password' bin/bundle exec rails db:seed" popd } diff --git a/scripts/install b/scripts/install index 18acc77..fe3ffbd 100755 --- a/scripts/install +++ b/scripts/install @@ -25,17 +25,6 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" ynh_script_progression --message="Installing Ruby..." --weight=4 ynh_exec_warn_less ynh_install_ruby --ruby_version="$ruby_version" -#================================================= -# CREATE A POSTGRESQL DATABASE -#================================================= -ynh_script_progression --message="Configuring $app's PostgreSQL database..." --weight=1 - -ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH SUPERUSER;" -ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS unaccent;" -ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" -ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;" -ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= From 8e26c33abd551b357daa39f96323777832262308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 16:00:21 +0200 Subject: [PATCH 24/40] Check for password policy at the beginning of the app install --- scripts/_common.sh | 22 ++++++++++++++++++++++ scripts/install | 2 ++ 2 files changed, 24 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index dff43e5..2dc6fb7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -25,6 +25,28 @@ fi # PERSONAL HELPERS #================================================= +check_password_policy() { + password="$1" + # 12 caractères minimum, au moins une lettre majuscule, une lettre minuscule, un chiffre et un caractère spécial + + msg="" + if (( ${#password} < 10 )); then + msg="is too short" + elif [[ $password != *[[:digit:]]* ]]; then + msg="does not contain any digit" + elif [[ $password != *[[:lower:]]* ]]; then + msg="does not contain any lower case letter" + elif [[ $password != *[[:upper:]]* ]]; then + msg="does not contain any upper case letter" + elif [[ "$password" =~ ^[0-9a-zA-Z]*$ ]]; then + msg="does not contain any special character" + fi + + if [ -n "$msg" ]; then + ynh_die "Password should have min 12 chars, at least one lowercase, one uppercase, one digit and one special character, but it $msg." + fi +} + env_ruby() { ynh_exec_as "$app" "$ynh_ruby_load_path" "$@" } diff --git a/scripts/install b/scripts/install index fe3ffbd..a8e77ae 100755 --- a/scripts/install +++ b/scripts/install @@ -16,6 +16,8 @@ admin_mail=$(ynh_user_get_info --username="$admin" --key=mail) secret_key_base=$(ynh_string_random --length=30) ynh_app_setting_set --app="$app" --key="secret_key_base" --value="$secret_key_base" +check_password_policy "$password" + #================================================= # INSTALL DEPENDENCIES #================================================= From 62258cf95eedc46608f7d68a0588135a718f863e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 16:41:46 +0200 Subject: [PATCH 25/40] Fix services config : add environentfile --- conf/fab-manager-app.service | 2 ++ conf/fab-manager-worker.service | 2 ++ 2 files changed, 4 insertions(+) diff --git a/conf/fab-manager-app.service b/conf/fab-manager-app.service index 0df694a..d65defb 100644 --- a/conf/fab-manager-app.service +++ b/conf/fab-manager-app.service @@ -8,7 +8,9 @@ User=__APP__ WorkingDirectory=__INSTALL_DIR__ Environment="__LD_PRELOAD__" Environment="__YNH_RUBY_LOAD_PATH__" +EnvironmentFile=__INSTALL_DIR__/.env Environment="RAILS_ENV=production" + ExecStartPre=-rm -f __INSTALL_DIR__/tmp/pids/server.pid ExecStart=__INSTALL_DIR__/bin/bundle exec rails s puma -p __PORT__ -b 127.0.0.1 ExecReload=/bin/kill -SIGUSR1 $MAINPID diff --git a/conf/fab-manager-worker.service b/conf/fab-manager-worker.service index 8254fc8..5760b90 100644 --- a/conf/fab-manager-worker.service +++ b/conf/fab-manager-worker.service @@ -8,7 +8,9 @@ User=__APP__ WorkingDirectory=__INSTALL_DIR__ Environment="__LD_PRELOAD__" Environment="__YNH_RUBY_LOAD_PATH__" +EnvironmentFile=__INSTALL_DIR__/.env Environment="RAILS_ENV=production" + ExecStart=__INSTALL_DIR__/bin/bundle exec sidekiq -C __INSTALL_DIR__/config/sidekiq.yml TimeoutSec=15 Restart=always From f58e71b5f205c1d33d8fa98e45034e5f71396348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 17:25:45 +0200 Subject: [PATCH 26/40] Fix service puma call --- conf/fab-manager-app.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/fab-manager-app.service b/conf/fab-manager-app.service index d65defb..f1bbf6d 100644 --- a/conf/fab-manager-app.service +++ b/conf/fab-manager-app.service @@ -12,7 +12,7 @@ EnvironmentFile=__INSTALL_DIR__/.env Environment="RAILS_ENV=production" ExecStartPre=-rm -f __INSTALL_DIR__/tmp/pids/server.pid -ExecStart=__INSTALL_DIR__/bin/bundle exec rails s puma -p __PORT__ -b 127.0.0.1 +ExecStart=__INSTALL_DIR__/bin/bundle exec rails service -u puma -p __PORT__ -b 127.0.0.1 ExecReload=/bin/kill -SIGUSR1 $MAINPID TimeoutSec=15 Restart=always From 1e1ba655fc39209a3f4fffb4a69ae37b20b3abc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 17:54:32 +0200 Subject: [PATCH 27/40] Fix service puma call --- conf/fab-manager-app.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/fab-manager-app.service b/conf/fab-manager-app.service index f1bbf6d..1c319d7 100644 --- a/conf/fab-manager-app.service +++ b/conf/fab-manager-app.service @@ -12,7 +12,7 @@ EnvironmentFile=__INSTALL_DIR__/.env Environment="RAILS_ENV=production" ExecStartPre=-rm -f __INSTALL_DIR__/tmp/pids/server.pid -ExecStart=__INSTALL_DIR__/bin/bundle exec rails service -u puma -p __PORT__ -b 127.0.0.1 +ExecStart=__INSTALL_DIR__/bin/bundle exec rails server -u puma -p __PORT__ -b 127.0.0.1 ExecReload=/bin/kill -SIGUSR1 $MAINPID TimeoutSec=15 Restart=always From 940052c7084c366cfee2f7552fd979b7b09cfc4d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 13 Jun 2024 03:33:50 +0200 Subject: [PATCH 28/40] Upgrade to v6.3.27 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index dae3160..a112996 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Fab-manager" description.en = "Fab Lab management solution" description.fr = "Solution de gestion de Fab Lab" -version = "6.3.22~ynh1" +version = "6.3.27~ynh1" maintainers = [] @@ -48,8 +48,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.22.tar.gz" - sha256 = "5ba874b2c9a80c80dcea2af51d8e8ece3fbacd43de3f359bea8f6612194b62c4" + url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.27.tar.gz" + sha256 = "c2ae66d2aa47e16b4664f235908acfb0ac5b67f5f1390baf0f83c85662724421" autoupdate.strategy = "latest_github_tag" From 9062307ceef7eeea7e0b5b6725d0b65e200eb2f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 18:22:47 +0200 Subject: [PATCH 29/40] Cleanup --- scripts/install | 6 ------ scripts/restore | 1 - scripts/upgrade | 3 +-- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index a8e77ae..1af1734 100755 --- a/scripts/install +++ b/scripts/install @@ -46,10 +46,6 @@ 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="dot_env" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown "$app:$app" "$install_dir/.env" @@ -65,9 +61,7 @@ ynh_script_progression --message="Building app..." --weight=7 fabmanager_build_ruby fabmanager_build_ui - fabmanager_seed_db -# fabmanager_migrate_db ynh_secure_remove --file="$install_dir/.cache" diff --git a/scripts/restore b/scripts/restore index dfa7198..d941144 100755 --- a/scripts/restore +++ b/scripts/restore @@ -56,7 +56,6 @@ ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" ynh_script_progression --message="Building app..." --weight=7 fabmanager_build_ruby - fabmanager_build_ui #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a938691..7999032 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,11 +82,10 @@ ynh_secure_remove --file="$install_dir/node_modules" ynh_secure_remove --file="$install_dir/tmp/cache" fabmanager_build_ruby +fabmanager_build_ui fabmanager_migrate_db -fabmanager_build_ui - #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= From 11d1452dc0aac8c02ca2633463ac0ec09fae84b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 30 Jun 2024 22:03:35 +0200 Subject: [PATCH 30/40] Fix restore, upgrade --- scripts/install | 1 + scripts/restore | 9 +++++---- scripts/upgrade | 11 ++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index 1af1734..c0a8abb 100755 --- a/scripts/install +++ b/scripts/install @@ -76,6 +76,7 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config --service="$app-app" --template="fab-manager-app.service" yunohost service add "$app-app" --description="$app app service" + ynh_add_systemd_config --service="$app-worker" --template="fab-manager-worker.service" yunohost service add "$app-worker" --description="$app worker service" diff --git a/scripts/restore b/scripts/restore index d941144..da50083 100755 --- a/scripts/restore +++ b/scripts/restore @@ -46,9 +46,8 @@ ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH S ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS unaccent;" ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" ynh_psql_execute_as_root --database="$db_name" --sql="CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;" -ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" - ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql +ynh_psql_execute_as_root --database="$db_name" --sql="ALTER USER $db_user WITH NOSUPERUSER;" #================================================= # BUILD APP @@ -66,9 +65,11 @@ ynh_script_progression --message="Restoring system configurations related to $ap ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/systemd/system/$app-app.service" -ynh_restore_file --origin_path="/etc/systemd/system/$app-worker.service" -systemctl enable "$app-app" "$app-worker" --quiet +systemctl enable "$app-app" --quiet yunohost service add "$app-app" --description="$app app service" + +ynh_restore_file --origin_path="/etc/systemd/system/$app-worker.service" +systemctl enable "$app-worker" --quiet yunohost service add "$app-worker" --description="$app worker service" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7999032..7244151 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -54,7 +54,7 @@ ynh_exec_warn_less ynh_install_ruby --ruby_version="$ruby_version" ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config/secrets.yml config/database.yml" +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env config/database.yml" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" @@ -64,9 +64,9 @@ chown -R "$app:www-data" "$install_dir" #================================================= ynh_script_progression --message="Updating 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="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" @@ -96,8 +96,9 @@ ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config --service="$app-app" --template="fab-manager-app.service" -ynh_add_systemd_config --service="$app-worker" --template="fab-manager-worker.service" yunohost service add "$app-app" --description="$app app service" + +ynh_add_systemd_config --service="$app-worker" --template="fab-manager-worker.service" yunohost service add "$app-worker" --description="$app worker service" #================================================= From 30b0e165cc2f8a4a415cf3786facb05cbe32acc2 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 1 Jul 2024 08:44:49 +0000 Subject: [PATCH 31/40] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 05827eb..46b457c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Shipped version:** 5.6.5~ynh2 +**Shipped version:** 6.3.27~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index be55229..a09ceb3 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Versión actual:** 5.6.5~ynh2 +**Versión actual:** 6.3.27~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 18763ae..92f8825 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Paketatutako bertsioa:** 5.6.5~ynh2 +**Paketatutako bertsioa:** 6.3.27~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 1830161..d78c0e6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Version incluse :** 5.6.5~ynh2 +**Version incluse :** 6.3.27~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index eaf9af8..b537e9e 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Versión proporcionada:** 5.6.5~ynh2 +**Versión proporcionada:** 6.3.27~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 02824a4..96ea631 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**分发版本:** 5.6.5~ynh2 +**分发版本:** 6.3.27~ynh1 **演示:** From f7a8359a06ecbac1d8c7bf2ace46ff61d0ee628a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 1 Jul 2024 11:16:07 +0200 Subject: [PATCH 32/40] Update list of things to keep --- scripts/upgrade | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7244151..214fa2d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -54,7 +54,13 @@ ynh_exec_warn_less ynh_install_ruby --ruby_version="$ruby_version" ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep=".env config/database.yml" +to_keep=( + # Basically inspired from the docker-compose.yml + .env config/database.yml config/auth_provider.yml public/packs public/uploads + invoices payment_schedules exports imports supporting_document_files plugins accounting +) + +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="${to_keep[*]}" chmod -R o-rwx "$install_dir" chown -R "$app:www-data" "$install_dir" From 1759e5e147ca65e91c4b2ec6163b62533260bc9a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 6 Jul 2024 03:33:32 +0200 Subject: [PATCH 33/40] Upgrade to v6.3.28 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index a112996..2ae8a0b 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Fab-manager" description.en = "Fab Lab management solution" description.fr = "Solution de gestion de Fab Lab" -version = "6.3.27~ynh1" +version = "6.3.28~ynh1" maintainers = [] @@ -48,8 +48,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.27.tar.gz" - sha256 = "c2ae66d2aa47e16b4664f235908acfb0ac5b67f5f1390baf0f83c85662724421" + url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.28.tar.gz" + sha256 = "18b2dd72309975c2f4150c3a0f9937335164e614c00852e62cbbd8b4396c061d" autoupdate.strategy = "latest_github_tag" From 56675931b529d2bdbd868dff9f0799478e6d3798 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 6 Jul 2024 01:33:35 +0000 Subject: [PATCH 34/40] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 46b457c..66d484f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Shipped version:** 6.3.27~ynh1 +**Shipped version:** 6.3.28~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index a09ceb3..ae7089f 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Versión actual:** 6.3.27~ynh1 +**Versión actual:** 6.3.28~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 92f8825..1574c4a 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Paketatutako bertsioa:** 6.3.27~ynh1 +**Paketatutako bertsioa:** 6.3.28~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index d78c0e6..c5dc512 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Version incluse :** 6.3.27~ynh1 +**Version incluse :** 6.3.28~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index b537e9e..bfead7a 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Versión proporcionada:** 6.3.27~ynh1 +**Versión proporcionada:** 6.3.28~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 96ea631..bb666b6 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**分发版本:** 6.3.27~ynh1 +**分发版本:** 6.3.28~ynh1 **演示:** From 05ca83088a166e2de0035c5625a1963019705c42 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 20 Jul 2024 03:33:23 +0200 Subject: [PATCH 35/40] Upgrade sources - `main` v6.3.30: https://github.com/sleede/fab-manager/releases/tag/6.3.30 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 2ae8a0b..d08dc75 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Fab-manager" description.en = "Fab Lab management solution" description.fr = "Solution de gestion de Fab Lab" -version = "6.3.28~ynh1" +version = "6.3.30~ynh1" maintainers = [] @@ -48,8 +48,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.28.tar.gz" - sha256 = "18b2dd72309975c2f4150c3a0f9937335164e614c00852e62cbbd8b4396c061d" + url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.30.tar.gz" + sha256 = "cc73087303abd740c71ebef9b5154c6989c8cdac8615b12d73e4e6b6040d5c58" autoupdate.strategy = "latest_github_tag" From 79c90600de31d39ad843c7493f5f87ee9a5be65a Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 20 Jul 2024 01:33:25 +0000 Subject: [PATCH 36/40] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 66d484f..fdd2f7a 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Shipped version:** 6.3.28~ynh1 +**Shipped version:** 6.3.30~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index ae7089f..9f1c3a0 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Versión actual:** 6.3.28~ynh1 +**Versión actual:** 6.3.30~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 1574c4a..83c84b0 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Paketatutako bertsioa:** 6.3.28~ynh1 +**Paketatutako bertsioa:** 6.3.30~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index c5dc512..bd1c6c2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Version incluse :** 6.3.28~ynh1 +**Version incluse :** 6.3.30~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index bfead7a..5582643 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Versión proporcionada:** 6.3.28~ynh1 +**Versión proporcionada:** 6.3.30~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index bb666b6..a487419 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**分发版本:** 6.3.28~ynh1 +**分发版本:** 6.3.30~ynh1 **演示:** From ff72dcb06574240e5684e94d892162953a1e2066 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 23 Jul 2024 03:33:27 +0200 Subject: [PATCH 37/40] Upgrade sources - `main` v6.3.31: https://github.com/sleede/fab-manager/releases/tag/6.3.31 --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index d08dc75..70a93ac 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Fab-manager" description.en = "Fab Lab management solution" description.fr = "Solution de gestion de Fab Lab" -version = "6.3.30~ynh1" +version = "6.3.31~ynh1" maintainers = [] @@ -48,8 +48,8 @@ ram.runtime = "50M" [resources] [resources.sources.main] - url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.30.tar.gz" - sha256 = "cc73087303abd740c71ebef9b5154c6989c8cdac8615b12d73e4e6b6040d5c58" + url = "https://github.com/sleede/fab-manager/archive/refs/tags/v6.3.31.tar.gz" + sha256 = "c6e51032b5b51f94ff1c48b263f791c86c83722aa5b000c39aadb55896b975b1" autoupdate.strategy = "latest_github_tag" From ab2ba229c9fe784256ccf75d6e8197a8621b8a4d Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 23 Jul 2024 01:33:29 +0000 Subject: [PATCH 38/40] Auto-update READMEs --- ALL_README.md | 1 + README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_id.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 2 +- 8 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 README_id.md diff --git a/ALL_README.md b/ALL_README.md index 152f2e7..4ed64dd 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -5,4 +5,5 @@ - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) +- [Baca README dalam bahasa bahasa Indonesia](README_id.md) - [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index fdd2f7a..1c0e2f4 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Shipped version:** 6.3.30~ynh1 +**Shipped version:** 6.3.31~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 9f1c3a0..78d186c 100644 --- a/README_es.md +++ b/README_es.md @@ -19,7 +19,7 @@ No se debe editar a mano. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Versión actual:** 6.3.30~ynh1 +**Versión actual:** 6.3.31~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 83c84b0..14729a8 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Paketatutako bertsioa:** 6.3.30~ynh1 +**Paketatutako bertsioa:** 6.3.31~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index bd1c6c2..926c4ec 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Version incluse :** 6.3.30~ynh1 +**Version incluse :** 6.3.31~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 5582643..8e31d91 100644 --- a/README_gl.md +++ b/README_gl.md @@ -19,7 +19,7 @@ NON debe editarse manualmente. Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**Versión proporcionada:** 6.3.30~ynh1 +**Versión proporcionada:** 6.3.31~ynh1 **Demo:** diff --git a/README_id.md b/README_id.md new file mode 100644 index 0000000..461f5cc --- /dev/null +++ b/README_id.md @@ -0,0 +1,50 @@ + + +# Fab-manager untuk YunoHost + +[![Tingkat integrasi](https://dash.yunohost.org/integration/fab-manager.svg)](https://ci-apps.yunohost.org/ci/apps/fab-manager/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/fab-manager.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/fab-manager.maintain.svg) + +[![Pasang Fab-manager dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fab-manager) + +*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)* + +> *Paket ini memperbolehkan Anda untuk memasang Fab-manager secara cepat dan mudah pada server YunoHost.* +> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.* + +## Ringkasan + +Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. + + +**Versi terkirim:** 6.3.31~ynh1 + +**Demo:** + +## Tangkapan Layar + +![Tangkapan Layar pada Fab-manager](./doc/screenshots/dashboard-mockup.webp) + +## Dokumentasi dan sumber daya + +- Website aplikasi resmi: +- Dokumentasi admin resmi: +- Repositori kode aplikasi hulu: +- Gudang YunoHost: +- Laporkan bug: + +## Info developer + +Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/fab-manager_ynh/tree/testing). + +Untuk mencoba branch `testing`, silakan dilanjutkan seperti: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/fab-manager_ynh/tree/testing --debug +atau +sudo yunohost app upgrade fab-manager -u https://github.com/YunoHost-Apps/fab-manager_ynh/tree/testing --debug +``` + +**Info lebih lanjut mengenai pemaketan aplikasi:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index a487419..a0927ea 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -19,7 +19,7 @@ Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. -**分发版本:** 6.3.30~ynh1 +**分发版本:** 6.3.31~ynh1 **演示:** From dc78803d99de475d0222992e6790a6f1d987a35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 23 Aug 2024 17:31:35 +0200 Subject: [PATCH 39/40] cleaning --- conf/dot_env | 3 ++- manifest.toml | 2 +- scripts/restore | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/dot_env b/conf/dot_env index 2f94fc1..06f858c 100644 --- a/conf/dot_env +++ b/conf/dot_env @@ -27,11 +27,12 @@ DEFAULT_PROTOCOL=https DELIVERY_METHOD=smtp SMTP_ADDRESS=localhost SMTP_PORT=25 +SMTP_DOMAIN=__DOMAIN__ SMTP_USER_NAME=__APP__ SMTP_PASSWORD=__MAIL_PWD__ SMTP_AUTHENTICATION=plain SMTP_ENABLE_STARTTLS_AUTO=false -SMTP_OPENSSL_VERIFY_MODE= +SMTP_OPENSSL_VERIFY_MODE=none SMTP_TLS=false # I18N configuration diff --git a/manifest.toml b/manifest.toml index 70a93ac..bd84e96 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,7 @@ admindoc = "http://doc.fab.mn" code = "https://github.com/sleede/fab-manager" [integration] -yunohost = ">= 11.2.12" +yunohost = ">= 11.2.27" architectures = "all" multi_instance = false diff --git a/scripts/restore b/scripts/restore index da50083..8eb86c6 100755 --- a/scripts/restore +++ b/scripts/restore @@ -11,10 +11,10 @@ source /usr/share/yunohost/helpers #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling NodeJS..." --weight=1 +ynh_script_progression --message="Reinstalling NodeJS and Ruby..." --weight=1 + ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version" -ynh_script_progression --message="Reinstalling Ruby..." --weight=4 ynh_exec_warn_less ynh_install_ruby --ruby_version="$ruby_version" #================================================= From 25913ebe9adf5215ebd75cf72c0a3ac72884dfa9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 23 Aug 2024 15:31:40 +0000 Subject: [PATCH 40/40] Auto-update READMEs --- ALL_README.md | 1 + README_id.md | 2 +- README_ru.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 README_ru.md diff --git a/ALL_README.md b/ALL_README.md index 4ed64dd..e3c80d2 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -6,4 +6,5 @@ - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) - [Baca README dalam bahasa bahasa Indonesia](README_id.md) +- [Прочитать README на русский](README_ru.md) - [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README_id.md b/README_id.md index 461f5cc..4aaaf70 100644 --- a/README_id.md +++ b/README_id.md @@ -31,7 +31,7 @@ Fab-manager is the Fab Lab management solution. It provides a comprehensive, web - Website aplikasi resmi: - Dokumentasi admin resmi: -- Repositori kode aplikasi hulu: +- Depot kode aplikasi hulu: - Gudang YunoHost: - Laporkan bug: diff --git a/README_ru.md b/README_ru.md new file mode 100644 index 0000000..d5bcfc9 --- /dev/null +++ b/README_ru.md @@ -0,0 +1,50 @@ + + +# Fab-manager для YunoHost + +[![Уровень интеграции](https://dash.yunohost.org/integration/fab-manager.svg)](https://ci-apps.yunohost.org/ci/apps/fab-manager/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/fab-manager.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/fab-manager.maintain.svg) + +[![Установите Fab-manager с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=fab-manager) + +*[Прочтите этот README на других языках.](./ALL_README.md)* + +> *Этот пакет позволяет Вам установить Fab-manager быстро и просто на YunoHost-сервер.* +> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.* + +## Обзор + +Fab-manager is the Fab Lab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks, and document your marker's projects. + + +**Поставляемая версия:** 6.3.31~ynh1 + +**Демо-версия:** + +## Снимки экрана + +![Снимок экрана Fab-manager](./doc/screenshots/dashboard-mockup.webp) + +## Документация и ресурсы + +- Официальный веб-сайт приложения: +- Официальная документация администратора: +- Репозиторий кода главной ветки приложения: +- Магазин YunoHost: +- Сообщите об ошибке: + +## Информация для разработчиков + +Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/fab-manager_ynh/tree/testing). + +Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/fab-manager_ynh/tree/testing --debug +или +sudo yunohost app upgrade fab-manager -u https://github.com/YunoHost-Apps/fab-manager_ynh/tree/testing --debug +``` + +**Больше информации о пакетировании приложений:**