chore: added gitignore and docker-compose

This commit is contained in:
Willem Serruys
2026-08-19 18:35:20 +02:00
parent 77e42910c5
commit fece1603e7
2 changed files with 51 additions and 0 deletions

10
.gitignore vendored
View File

@@ -17,3 +17,13 @@ config/
[Oo]bj/
.aider*
.env
node_modules/
dist/
build/
*.db
*.db-journal
.env
.env.local
*.log
.DS_Store

View File

@@ -131,6 +131,46 @@ services:
# Only enable if external services present
# ports:
# - 4317:4317 # OTLP gRPC receiver
energy-management:
build:
context: ./energy-management
labels:
- traefik.http.routers.prometheus.rule=Host(`energy-management.pladijs`)
- traefik.http.services.prometheus.loadbalancer.server.port=3000
env_file:
- .env
environment:
DB_PATH: /app/data/energy.db
# InfluxDB 2.x
INFLUX_URL: http://influxdb.pladijs
INFLUX_TOKEN: f9YTt1XmjUwtYuM1JXKyHaXU3D1NH3aRxf3jcP2cEyD0IfPmM-_Im35VpIAPct7oWKjk261rX5uzrQ4ue4tJFw==
INFLUX_ORG: homeassistant
INFLUX_BUCKET: homeassistant
# Measurement/field that holds live power draw for the whole house
INFLUX_FIELD: value
# Unit of INFLUX_FIELD as stored in Influx: W or kW
INFLUX_FIELD_UNIT: W
INFLUX_DOMAIN: sensor
INFLUX_ENTITY_ID: p1_meter_power
# Home Assistant
HA_URL: http://homeassistant.pladijs
HA_TOKEN: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIxZjlhYzBjYjlkZDE0YWEzYWFhMzVjMzU2Y2VkM2U5MCIsImlhdCI6MTc4NzA4MjEyNywiZXhwIjoyMTAyNDQyMTI3fQ.W6MF78ZPiXF-__GmlFK2D-3vwYGEI3eEgouxw007D64
# Capacity tariff target: keep every 15-minute block's average under this many kW
TARGET_KW: 4
# Optional
PORT: 3000
DB_PATH: ./data/energy.db
CONTROL_LOOP_INTERVAL_MS: 10000
volumes:
- energy-management-data:/app/data
restart: unless-stopped
volumes:
energy-management-data:
volumes:
prometheus-data:
influxdb-data:
@@ -139,3 +179,4 @@ volumes:
mosquitto-data:
traefik-data:
syncthing-data:
energy-management-data: