Skip to content

Commit

Permalink
Merge pull request #391 from jasonacox/v3.0.2
Browse files Browse the repository at this point in the history
V3.0.2 - Docker-Compose Fixes
  • Loading branch information
jasonacox authored Nov 20, 2023
2 parents ebfff7b + 1fb806d commit 2644e62
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# RELEASE NOTES

## v3.0.2 - Docker-Compose Fixes

* Add future deprecation WARNING for older docker-compose versions.
* Add support for docker-compose >= 1.28.0 to use compose profiles.
* Change logic in `compose-dash.sh` to default to Docker compose V2.

## v3.0.1 - Fix for Docker-Compose V1

* This fixes an issue introduced by v3.0.0 for old Docker-Compose V1 systems in https://github.com/jasonacox/Powerwall-Dashboard/pull/389
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.1
3.0.2
24 changes: 17 additions & 7 deletions compose-dash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ if ! docker info > /dev/null 2>&1; then
fi

# Load environment variables for compose
if [ ! -f "compose.env" ]; then
echo "ERROR: Missing compose.env file."
echo "Please run setup.sh or copy compose.env.sample to compose.env."
if [ ! -f ${COMPOSE_ENV_FILE} ]; then
echo "ERROR: Missing ${COMPOSE_ENV_FILE} file."
echo "Please run setup.sh or copy ${COMPOSE_ENV_FILE}.sample to ${COMPOSE_ENV_FILE}."
exit 1
fi
set -a
. compose.env
. "${COMPOSE_ENV_FILE}"
set +a

# Docker Compose Extension Check
Expand Down Expand Up @@ -79,9 +79,19 @@ if docker compose version > /dev/null 2>&1; then
else
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"
if docker-compose -f powerwall.yml config > /dev/null 2>&1; then
pwconfig="powerwall.yml"
else
echo "** WARNING **"
echo " You have an old version of docker-compose that will"
echo " be deprecated in a future release. Please upgrade or"
echo " report your use case to the Powerwall-Dashboard project."
echo ""
echo "Applying workaround for old docker-compose..."
pwconfig="powerwall-v1.yml"
if get_profile "solar-only"; then
pwconfig="powerwall-v1-solar.yml"
fi
fi
docker-compose -f $pwconfig $pwextend $@
else
Expand Down
2 changes: 1 addition & 1 deletion upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -e

# Set Globals
VERSION="3.0.1"
VERSION="3.0.2"
CURRENT="Unknown"
COMPOSE_ENV_FILE="compose.env"
TELEGRAF_LOCAL="telegraf.local"
Expand Down

0 comments on commit 2644e62

Please sign in to comment.