diff --git a/CHANGELOG.md b/CHANGELOG.md
index d2f7b1bae..6731878f5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,8 @@
- Added some eslint rules to validate react components code style
- Fixed all react components code according to eslint rules
- Renamed proof-of-identity to supporting-documents in react components and in end-user strings
+- Use bat to display coloured documentation of environment variables during setup
+- Check the minimum docker version (20.10) during setup and upgrade
- Fix a bug: when email was mapped from SSO provided as empty string -> unable to merge account
- Fix a bug: when an empty data was retured by the SSO, unable to edit it
- Fix a bug: user can change his group in the profile completion page, even if mapped from the SSO
diff --git a/doc/environment.md b/doc/environment.md
index ec9577d8b..9d9f69166 100644
--- a/doc/environment.md
+++ b/doc/environment.md
@@ -58,9 +58,9 @@ You can generate such a random key by running `rails secret`.
Configure the Rails' Action Mailer delivery method.
See http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration for more details.
-
+
- SMTP_ADDRESS, SMTP_PORT, SMTP_USER_NAME, SMTP_PASSWORD, SMTP_AUTHENTICATION, SMTP_ENABLE_STARTTLS_AUTO, SMTP_OPENSSL_VERIFY_MODE & SMTP_TLS
+ SMTP_ADDRESS, SMTP_PORT, SMTP_USER_NAME, SMTP_PASSWORD, SMTP_AUTHENTICATION, SMTP_ENABLE_STARTTLS_AUTO & SMTP_OPENSSL_VERIFY_MODE
When DELIVERY_METHOD is set to **smtp**, configure the SMTP server parameters.
See https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration for more details.
diff --git a/doc/production_readme.md b/doc/production_readme.md
index f19640193..0ed30cb83 100644
--- a/doc/production_readme.md
+++ b/doc/production_readme.md
@@ -50,7 +50,7 @@ This might work on other linux systems, and CPU architectures but this is untest
`curl` and `bash` are needed to retrieve and run the automated deployment scripts.
Then the various scripts will check for their own dependencies.
-Moreover, the main software dependencies to run fab-manager are [Docker](https://docs.docker.com/engine/installation/linux/docker-ce/debian/) v20.0 or above and [Docker Compose](https://docs.docker.com/compose/install/)
+Moreover, the main software dependencies to run fab-manager are [Docker](https://docs.docker.com/engine/installation/linux/docker-ce/debian/) v20.10 or above and [Docker Compose](https://docs.docker.com/compose/install/)
They can be easily installed using the [`prepare-vps.sleede.com` script below](#prepare-the-server).
diff --git a/setup/setup.sh b/setup/setup.sh
index bc8c1f018..2bd954455 100755
--- a/setup/setup.sh
+++ b/setup/setup.sh
@@ -15,11 +15,11 @@ welcome_message()
printf "\n Welcome to Fab-manager's setup assistant\n\n\n"
echo "Thank you for installing Fab-manager."
printf "This script will guide you through the installation process of Fab-manager\n\n"
- echo -e "Please report any \e[1mfeedback or improvement request\e[21m on https://feedback.fab-manager.com/"
- echo -e "For \e[1mbug reports\e[21m, please open a new issue on https://github.com/sleede/fab-manager/issues"
- echo -e "You can call for \e[1mcommunity assistance\e[21m on https://forum.fab-manager.com/"
+ echo -e "Please report any \e[1mfeedback or improvement request\e[0m on https://feedback.fab-manager.com/"
+ echo -e "For \e[1mbug reports\e[0m, please open a new issue on https://github.com/sleede/fab-manager/issues"
+ echo -e "You can call for \e[1mcommunity assistance\e[0m on https://forum.fab-manager.com/"
printf "\nYou can interrupt this installation at any time by pressing Ctrl+C\n"
- printf "If you do not feel confortable with this installation, you can \e[4msubscribe to our hosting offers\e[24m:\nhttps://www.fab-manager.com/saas-offer\n\n"
+ printf "If you do not feel confortable with this installation, you can \e[4msubscribe to our hosting offers\e[0m:\nhttps://www.fab-manager.com/saas-offer\n\n"
read -rp "Continue? (Y/n) " confirm /dev/null 2>/dev/null
@@ -236,6 +250,10 @@ yq() {
docker run --rm -i -v "${FABMANAGER_PATH}:/workdir" --user "$UID" mikefarah/yq:4 "$@"
}
+bat() {
+ docker run --rm -i -v "${PWD}:/workdir" --user "$UID" sleede/bat:latest "$@"
+}
+
prepare_nginx()
{
if [ "$NGINX" != "n" ]; then
@@ -365,12 +383,9 @@ configure_env_file()
local var_doc current
var_doc=$(get_md_anchor "$doc" "$variable")
current=$(grep "$variable=" "$FABMANAGER_PATH/config/env")
- printf "\n\n\n==== \e[4m%s\e[24m ====\n" "$variable"
- printf "**** \e[1mDocumentation:\e[21m ****\n"
- echo "$var_doc"
- printf "=======================\n- \e[1mCurrent value: %s\e[21m\n- New value? (leave empty to keep the current value)\n" "$current"
+ echo "$var_doc" | bat --file-name "$variable" --language md --color=always
+ printf "- \e[1mCurrent value: %s\e[21m\n- New value? (leave empty to keep the current value)\n" "$current"
read -rep " > " value /dev/null; then
- get_md_anchor "$doc" "ALLOW_INSECURE_HTTP"
+ get_md_anchor "$doc" "ALLOW_INSECURE_HTTP" | bat --file-name "ALLOW_INSECURE_HTTP" --language md --color=always
printf "You have set \e[1mDEFAULT_PROTOCOL\e[21m to \e[1mhttp\e[21m.\n"
read -rp "Do you want to allow insecure HTTP? (Y/n) " confirm