Skip to content

Commit

Permalink
0.0.6 [WIP] some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LReg committed Oct 14, 2024
1 parent 1cd08d1 commit 927c42c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 2 additions & 6 deletions docker-cli.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
set -e

./docker/scripts/unsetEmptyVars.sh "./.env"

if [ ! -f "./.env" ]; then
echo "File ./.env is missing, please execute setup script first, see documentation."
fi
Expand Down Expand Up @@ -47,12 +49,6 @@ elif [ "$2" == "up" ]; then
docker compose -f docker/composeFiles/auth.docker-compose.yml --env-file ./.env "$2" -d --force-recreate --wait --wait-timeout 120
fi
if [ "$1" == "frontend" ] || [ "$1" == "backend" ] || [ "$1" == "db" ]; then
if [ -n "${DOCKER_VOLUME_PATH}" ]; then
echo "DOCKER_VOLUME_PATH is not set"
fi
if [ "${DOCKER_VOLUME_PATH}" == "" ]; then
echo "DOCKER_VOLUME_PATH is empty"
fi
docker compose -f docker/composeFiles/app.docker-compose.yml --env-file ./.env config
docker compose -f docker/composeFiles/app.docker-compose.yml --env-file ./.env "$2" "$1" -d --force-recreate
fi
Expand Down
4 changes: 0 additions & 4 deletions docker/scripts/unsetEmptyVars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ while IFS= read -r line; do
LINE_NUMBER=$((LINE_NUMBER+1))
if [[ "$line" =~ ^[A-Z_]+=[^\"]+ ]]; then
VAR_NAME=$(echo "$line" | cut -d'=' -f1)

echo "Checking $VAR_NAME"
echo "Content is ${!VAR_NAME}"

if [ -n "${!VAR_NAME}" ] || [ "${!VAR_NAME}" == "" ]; then
unset "$VAR_NAME"
echo "Unset $VAR_NAME"
Expand Down

0 comments on commit 927c42c

Please sign in to comment.