diff --git a/bin/configure b/bin/configure index 5616b12616..313bc26aaf 100755 --- a/bin/configure +++ b/bin/configure @@ -7,23 +7,15 @@ done cd "${git_dir}" || exit -if [ -e ./docker/bootstrap/bootstrap.env ]; then - . ./docker/bootstrap/bootstrap.env -fi +. ./docker/bootstrap/bootstrap.env -# TODO Add configuration -cp docker-compose.yaml.in docker-compose.yaml while :; do printf "DBMS (postgres|mariadb): " && read -r dbms - echo "${dbms}" | grep -Eq 'postgres|mariadb' && break -done - -while :; do - printf "Social database name: " && read -r db - echo "${db}" | grep -vEq 'postgres' && break + [ $(echo "${dbms}" | grep -E 'postgres|mariadb') ] && break done +printf "Social database name: " && read -r db [ "${dbms}" = 'mariadb' ] && printf "Database user: " && read -r user printf "Database password: " && read -r password printf "Sitename: " && read -r sitename @@ -32,7 +24,7 @@ printf "Admin password: " && read -r admin_password while :; do printf "Site profile (public|private|community|single_user): " && read -r profile - echo "${profile}" | grep -Eq 'public|private|community|single_user' && break + [ $(echo "${profile}" | grep -E 'public|private|community|single_user') ] && break done mkdir -p ./docker/db diff --git a/docker-compose.yaml.in b/docker-compose.yaml similarity index 100% rename from docker-compose.yaml.in rename to docker-compose.yaml