From 8f8c662e5ea8bf0232978df8598b0c34e1e2f0a9 Mon Sep 17 00:00:00 2001 From: Philipp Traber Date: Sat, 26 Sep 2026 12:02:12 +0200 Subject: [PATCH] update branding and ci --- .gitea/workflows/docker.yml | 3 ++- README.md | 27 +++++++++++++++++---------- data/{history.csv => heatpump.csv} | 0 docker-compose.yml | 6 ++++-- html/app.js | 4 ++-- html/i18n.js | 4 ++-- html/index.html | 4 ++-- nginx/default.conf | 2 +- 8 files changed, 30 insertions(+), 20 deletions(-) rename data/{history.csv => heatpump.csv} (100%) diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index 7edd05e..d0c3f5d 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -32,11 +32,12 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.IMAGE }} + # main-- sorts by build time, for Flux image automation tags: | type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=main-{{sha}}-{{date 'X'}},enable={{is_default_branch}} type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=sha,format=short - name: Build and push uses: docker/build-push-action@v6 diff --git a/README.md b/README.md index 7d4f253..3860666 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -# Heatpump cycle analysis +# Interval Viz -A small static web app that visualises when a heat pump compressor is running, -based on Home Assistant history exports (`binary_sensor.*` on/off states). +A small static web app that visualises on/off intervals, such as when a heat +pump compressor is running. It reads Home Assistant history exports +(`binary_sensor.*` on/off states). - Interactive timeline (pan, zoom, mouse-wheel, quick ranges 6 h / 24 h / 3 d / 7 d; double-click or Esc resets the zoom) @@ -87,19 +88,25 @@ docker compose up -d --build Open and log in as `dev` / `dev`. These development credentials are set in `docker-compose.yml`. The host port can be changed with -`HEATPUMP_PORT=9000 docker compose up -d`. +`INTERVAL_VIZ_PORT=9000 docker compose up -d`. ## CI: build and push `.gitea/workflows/docker.yml` builds the image with Gitea Actions and pushes it to the Harbor registry as `registry.traberph.de/public/interval_viz`. -| Trigger | Tags pushed | -|--------------------|-----------------------------------| -| push to `main` | `latest`, `sha-` | -| tag `v1.2.3` | `1.2.3`, `1.2`, `sha-` | -| pull request | build only, nothing pushed | -| manual dispatch | as for the selected ref | +| Trigger | Tags pushed | +|--------------------|------------------------------------------------------| +| push to `main` | `latest`, `main--` (e.g. `main-6cecbcf-1790415657`) | +| tag `v1.2.3` | `1.2.3`, `1.2` | +| pull request | build only, nothing pushed | +| manual dispatch | as for the selected ref | + +The `main-…` tags sort by build time via the trailing timestamp. Flux image +automation can pick the newest one with this filter: +`pattern: '^main-[a-f0-9]+-(?P[0-9]+)$'`, `extract: '$ts'`, `numerical: asc`. + +Old tags are cleaned up by a tag retention policy in Harbor, not by this workflow. Setup: diff --git a/data/history.csv b/data/heatpump.csv similarity index 100% rename from data/history.csv rename to data/heatpump.csv diff --git a/docker-compose.yml b/docker-compose.yml index e376980..2c818dd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,12 @@ +name: interval_viz + services: - heatpump: + interval_viz: build: . image: registry.traberph.de/public/interval_viz:latest restart: unless-stopped ports: - - "${HEATPUMP_PORT:-8080}:80" + - "${INTERVAL_VIZ_PORT:-8080}:80" environment: BASIC_AUTH_USER: dev BASIC_AUTH_PASSWORD: dev diff --git a/html/app.js b/html/app.js index a5cb653..b039e5b 100644 --- a/html/app.js +++ b/html/app.js @@ -1,7 +1,7 @@ 'use strict'; -const LANG_KEY = 'heatpump.lang'; -const DATASET_KEY = 'heatpump.dataset'; +const LANG_KEY = 'intervalviz.lang'; +const DATASET_KEY = 'intervalviz.dataset'; const DATA_DIR = 'data/'; const HOUR = 3600e3; diff --git a/html/i18n.js b/html/i18n.js index 7ab5ac4..4f01f5a 100644 --- a/html/i18n.js +++ b/html/i18n.js @@ -4,7 +4,7 @@ const I18N = { en: { locale: 'en-GB', - title: 'Heatpump compressor cycles', + title: 'Interval Viz', loading: 'loading…', dataHeading: 'Data', rangeHeading: 'Selected range', @@ -45,7 +45,7 @@ const I18N = { }, de: { locale: 'de-DE', - title: 'Wärmepumpe – Verdichterzyklen', + title: 'Interval Viz', loading: 'lädt…', dataHeading: 'Daten', rangeHeading: 'Ausgewählter Zeitraum', diff --git a/html/index.html b/html/index.html index cbde048..d25387a 100644 --- a/html/index.html +++ b/html/index.html @@ -3,7 +3,7 @@ -Heatpump Cycles +Interval Viz @@ -14,7 +14,7 @@
-

Heatpump compressor cycles

+

Interval Viz

diff --git a/nginx/default.conf b/nginx/default.conf index 111d0dd..e604574 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -11,7 +11,7 @@ server { gzip_comp_level 6; gzip_types text/css text/csv application/javascript application/json; - auth_basic "Heatpump"; + auth_basic "Interval Viz"; auth_basic_user_file /etc/nginx/.htpasswd; location / {