Files
MeterVault/deploy/docker-compose.yml
T
schmidt.florian fe3d81b192 Deploy: change default HTTP port 8080 -> 8760
8080 is a very common, collision-prone port. 8760 (hours in a year) is an uncommon default that also avoids Home Assistant's 8123. Applied across Dockerfile (ASPNETCORE_URLS/EXPOSE), compose (mapping + healthcheck), the Unraid template, README and a code comment. The METERVAULT_PORT host override still works.

Claude-Session: https://claude.ai/code/session_01Kib2MniVFbD95fkgLgBBnB
2026-07-17 11:05:01 +02:00

54 lines
1.9 KiB
YAML

# MeterVault self-host stack: the Blazor app + TimescaleDB.
# docker compose -f deploy/docker-compose.yml up -d
# Secrets are supplied via environment variables (Section__Key double-underscore mapping)
# with ${VAR:-default} fallbacks — never baked into the image.
services:
db:
image: timescale/timescaledb:2.17.2-pg16
environment:
POSTGRES_DB: metervault
POSTGRES_USER: metervault
POSTGRES_PASSWORD: ${METERVAULT_DB_PASSWORD:-metervault}
volumes:
- metervault_db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U metervault -d metervault"]
interval: 10s
timeout: 5s
retries: 10
restart: unless-stopped
app:
build:
context: ..
dockerfile: deploy/Dockerfile
image: ${METERVAULT_IMAGE:-metervault/metervault:local}
depends_on:
db:
condition: service_healthy
environment:
ConnectionStrings__Default: "Host=db;Port=5432;Database=metervault;Username=metervault;Password=${METERVAULT_DB_PASSWORD:-metervault}"
ASPNETCORE_ENVIRONMENT: Production
MeterVault__TimeZone: ${METERVAULT_TIMEZONE:-Europe/Berlin}
MeterVault__Currency: ${METERVAULT_CURRENCY:-EUR}
MeterVault__Locale: ${METERVAULT_LOCALE:-en}
# Set true for a populated demo: loads the bundled Energiebilanz dataset on first start
# (idempotent). Leave false for a clean instance.
MeterVault__SeedReferenceData: ${METERVAULT_SEED:-false}
# REST API is closed by default. Set a key to enable it (or AllowAnonymousApi on a trusted LAN):
# MeterVault__ApiKeys__0: your-secret-key
# MeterVault__AllowAnonymousApi: "true"
ports:
- "${METERVAULT_PORT:-8760}:8760"
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8760/healthz || exit 1"]
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
volumes:
metervault_db: