Skip to content

Commit

Permalink
Merge pull request #389 from jasonacox/v3.0.1
Browse files Browse the repository at this point in the history
Docker-Compose V1 Fix - v3.0.1
  • Loading branch information
jasonacox authored Nov 19, 2023
2 parents faa3a81 + b12a494 commit 0ed811e
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 3 deletions.
5 changes: 5 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# RELEASE NOTES

## 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
* Updates example backup script to use `xz` compression in #337

## v3.0.0 - Integrate Solar Only Support

* Added Solar Only support as a setup option when installing Powerwall Dashboard by @mcbirse in https://github.com/jasonacox/Powerwall-Dashboard/pull/386 see https://github.com/jasonacox/Powerwall-Dashboard/issues/183 and https://github.com/jasonacox/Powerwall-Dashboard/tree/main/tools/solar-only
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.0.1
26 changes: 25 additions & 1 deletion compose-dash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# Stop on Errors
set -e

# Set Globals
COMPOSE_ENV_FILE="compose.env"

# Check for Arguments
if [ -z "$1" ]
then
Expand Down Expand Up @@ -51,11 +54,32 @@ if [ -f "powerwall.extend.yml" ]; then
else
pwextend=""
fi
# Compose Profiles Helper Functions
get_profile() {
if [ ! -f ${COMPOSE_ENV_FILE} ]; then
return 1
else
unset COMPOSE_PROFILES
. "${COMPOSE_ENV_FILE}"
fi
# Check COMPOSE_PROFILES for profile
IFS=',' read -a PROFILES <<< ${COMPOSE_PROFILES}
for p in "${PROFILES[@]}"; do
if [ "${p}" == "${1}" ]; then
return 0
fi
done
return 1
}

echo "Running Docker Compose..."
if docker-compose version > /dev/null 2>&1; then
# Build Docker (v1)
docker-compose -f powerwall.yml $pwextend $@
pwconfig="powerwall-v1.yml"
if get_profile "solar-only"; then
pwconfig="powerwall-v1-solar.yml"
fi
docker-compose -f $pwconfig $pwextend $@
else
if docker compose version > /dev/null 2>&1; then
# Build Docker (v2)
Expand Down
71 changes: 71 additions & 0 deletions powerwall-v1-solar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
version: "3.5"

services:
influxdb:
image: influxdb:1.8
container_name: influxdb
hostname: influxdb
restart: unless-stopped
volumes:
- type: bind
source: ./influxdb.conf
target: /etc/influxdb/influxdb.conf
read_only: true
- type: bind
source: ./influxdb
target: /var/lib/influxdb
ports:
- "${INFLUXDB_PORTS:-8086:8086}"

grafana:
image: grafana/grafana:9.1.2-ubuntu
container_name: grafana
hostname: grafana
restart: unless-stopped
user: "${PWD_USER:-1000:1000}"
volumes:
- type: bind
source: ./grafana
target: /var/lib/grafana
ports:
- "${GRAFANA_PORTS:-9000:9000}"
env_file:
- grafana.env
depends_on:
- influxdb

weather411:
image: jasonacox/weather411:0.2.2
container_name: weather411
hostname: weather411
restart: unless-stopped
user: "${PWD_USER:-1000:1000}"
volumes:
- type: bind
source: ./weather
target: /var/lib/weather
read_only: true
ports:
- "${WEATHER411_PORTS:-8676:8676}"
environment:
- WEATHERCONF=/var/lib/weather/weather411.conf
depends_on:
- influxdb

tesla-history:
image: jasonacox/tesla-history:0.1.4
container_name: tesla-history
hostname: tesla-history
restart: unless-stopped
user: "${PWD_USER:-1000:1000}"
volumes:
- type: bind
source: ./tools/tesla-history
target: /var/lib/tesla-history
environment:
- INFLUX_HOST=influxdb
- INFLUX_PORT=8086
- TESLA_CONF=/var/lib/tesla-history/tesla-history.conf
- TESLA_AUTH=/var/lib/tesla-history/tesla-history.auth
depends_on:
- influxdb
90 changes: 90 additions & 0 deletions powerwall-v1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
version: "3.5"

services:
influxdb:
image: influxdb:1.8
container_name: influxdb
hostname: influxdb
restart: unless-stopped
volumes:
- type: bind
source: ./influxdb.conf
target: /etc/influxdb/influxdb.conf
read_only: true
- type: bind
source: ./influxdb
target: /var/lib/influxdb
ports:
- "${INFLUXDB_PORTS:-8086:8086}"

pypowerwall:
image: jasonacox/pypowerwall:0.6.2t28
container_name: pypowerwall
hostname: pypowerwall
restart: unless-stopped
user: "${PWD_USER:-1000:1000}"
ports:
- "${PYPOWERWALL_PORTS:-8675:8675}"
env_file:
- pypowerwall.env

telegraf:
image: telegraf:1.28.2
container_name: telegraf
hostname: telegraf
restart: unless-stopped
user: "${PWD_USER:-1000:1000}"
command: [
"telegraf",
"--config",
"/etc/telegraf/telegraf.conf",
"--config-directory",
"/etc/telegraf/telegraf.d"
]
volumes:
- type: bind
source: ./telegraf.conf
target: /etc/telegraf/telegraf.conf
read_only: true
- type: bind
source: ./telegraf.local
target: /etc/telegraf/telegraf.d/local.conf
read_only: true
depends_on:
- influxdb
- pypowerwall

grafana:
image: grafana/grafana:9.1.2-ubuntu
container_name: grafana
hostname: grafana
restart: unless-stopped
user: "${PWD_USER:-1000:1000}"
volumes:
- type: bind
source: ./grafana
target: /var/lib/grafana
ports:
- "${GRAFANA_PORTS:-9000:9000}"
env_file:
- grafana.env
depends_on:
- influxdb

weather411:
image: jasonacox/weather411:0.2.2
container_name: weather411
hostname: weather411
restart: unless-stopped
user: "${PWD_USER:-1000:1000}"
volumes:
- type: bind
source: ./weather
target: /var/lib/weather
read_only: true
ports:
- "${WEATHER411_PORTS:-8676:8676}"
environment:
- WEATHERCONF=/var/lib/weather/weather411.conf
depends_on:
- influxdb
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.0"
VERSION="3.0.1"
CURRENT="Unknown"
COMPOSE_ENV_FILE="compose.env"
TELEGRAF_LOCAL="telegraf.local"
Expand Down

0 comments on commit 0ed811e

Please sign in to comment.