Skip to content

Commit

Permalink
Fix docker compose version check order
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbirse committed Nov 19, 2023
1 parent 0ed811e commit ebfff7b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions compose-dash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ get_profile() {
}

echo "Running Docker Compose..."
if docker-compose version > /dev/null 2>&1; then
# Build Docker (v1)
pwconfig="powerwall-v1.yml"
if get_profile "solar-only"; then
pwconfig="powerwall-v1-solar.yml"
fi
docker-compose -f $pwconfig $pwextend $@
if docker compose version > /dev/null 2>&1; then
# Build Docker (v2)
docker compose -f powerwall.yml $pwextend $@
else
if docker compose version > /dev/null 2>&1; then
# Build Docker (v2)
docker compose -f powerwall.yml $pwextend $@
if docker-compose version > /dev/null 2>&1; then
# Build Docker (v1)
pwconfig="powerwall-v1.yml"
if get_profile "solar-only"; then
pwconfig="powerwall-v1-solar.yml"
fi
docker-compose -f $pwconfig $pwextend $@
else
echo "ERROR: docker-compose/docker compose is not available or not running."
echo "This script requires docker-compose or docker compose."
Expand Down

0 comments on commit ebfff7b

Please sign in to comment.