mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
[bug] unable to install a new instance with an external reverse proxy
This commit is contained in:
parent
c0a99b67bd
commit
a01aa0dd75
@ -1,5 +1,8 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Improved the setup script
|
||||
- Fix a bug: unable to install a new instance with an external reverse proxy
|
||||
|
||||
## v4.7.2 2021 March 1st
|
||||
- Updated yq to v4
|
||||
- Fix a bug: unable to upgrade using the easy upgrade command
|
||||
|
@ -165,12 +165,23 @@ prepare_nginx()
|
||||
if [ "$confirm" != "n" ]; then
|
||||
echo "Adding a network configuration to the docker-compose.yml file..."
|
||||
yq -i eval '.networks.web.external = "true"' docker-compose.yml
|
||||
yq -i eval '.networks.db = ""' docker-compose.yml
|
||||
yq -i eval '.networks.db = null' docker-compose.yml
|
||||
yq -i eval '.services.fabmanager.networks += ["web"]' docker-compose.yml
|
||||
yq -i eval '.services.fabmanager.networks += ["db"]' docker-compose.yml
|
||||
yq -i eval '.services.postgres.networks += ["db"]' docker-compose.yml
|
||||
yq -i eval '.services.redis.networks += ["db"]' docker-compose.yml
|
||||
fi
|
||||
read -rp "Do you want to rename the Fab-manager's service? (Y/n) " confirm </dev/tty
|
||||
if [ "$confirm" != "n" ]; then
|
||||
current="$(yq eval '.services.*.image | select(. == "sleede/fab-manager*") | path | .[-2]' docker-compose.yml)"
|
||||
printf "=======================\n- \e[1mCurrent value: %s\e[21m\n- New value? (leave empty to keep the current value)\n" "$current"
|
||||
read -rp " > " value </dev/tty
|
||||
echo "======================="
|
||||
if [ "$value" != "" ]; then
|
||||
escaped=$(printf '%s\n' "$value" | iconv -f utf8 -t ascii//TRANSLIT//IGNORE | sed -e 's/[^a-zA-Z0-9-]/_/g')
|
||||
yq -i eval ".services.$escaped = .services.$current | del(.services.$current)" docker-compose.yml
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@ -245,7 +256,7 @@ configure_env_file()
|
||||
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 current value)\n" "$current"
|
||||
printf "=======================\n- \e[1mCurrent value: %s\e[21m\n- New value? (leave empty to keep the current value)\n" "$current"
|
||||
read -rp " > " value </dev/tty
|
||||
echo "======================="
|
||||
if [ "$value" != "" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user