1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

setup: external network

This commit is contained in:
Sylvain 2021-06-07 15:45:58 +02:00
parent 4e18a03de6
commit 684e6f779b
2 changed files with 10 additions and 2 deletions

View File

@ -15,6 +15,7 @@
- Task to reset the stripe payment methods in test mode
- Validate on server side the reservation of slots restricted to subscribers
Unified and documented upgrade exit codes
- During setup, ask for the name of the external network and create it, if it does not already exists
- Fix a bug: build status badge is not working
- Fix a bug: unable to set date formats during installation
- Fix a bug: unable to cancel the upgrade before it begins

View File

@ -112,7 +112,7 @@ config()
{
SERVICE="fabmanager"
echo 'We recommend nginx to serve the application over the network (internet). You can use your own solution or let this script install and configure nginx for Fab-manager.'
printf 'If you want to setup install Fab-manager behind a reverse proxy, you may not need to install the integrated nginx.\n'
printf 'If you want to install Fab-manager behind a reverse proxy, you may not need to install the integrated nginx.\n'
read -rp 'Do you want install nginx? (Y/n) ' NGINX </dev/tty
if [ "$NGINX" != "n" ]; then
# if the user doesn't want nginx, let him use its own solution for HTTPS
@ -211,14 +211,21 @@ prepare_nginx()
printf "The two following configurations are useful if you want to install Fab-manager behind a reverse proxy...\n"
read -rp "- Do you want to map the Fab-manager's service to an external network? (Y/n) " confirm </dev/tty
if [ "$confirm" != "n" ]; then
read -rp "Please input the name of the external network (default: web) " network </dev/tty
if [ "$network" = "" ]; then network="web"; fi
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.$network.external = \"true\"" docker-compose.yml
yq -i eval '.networks.db = "" | .networks.db tag="!!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.elasticsearch.networks += ["db"]' docker-compose.yml
yq -i eval '.services.redis.networks += ["db"]' docker-compose.yml
if ! docker network inspect "$network" 1>/dev/null; then
echo "Creating the external network $network..."
docker network create "$network"
fi
fi
read -rp "- Do you want to rename the Fab-manager's service? (Y/n) " confirm </dev/tty
if [ "$confirm" != "n" ]; then