update branding and ci
Build image / build (push) Successful in 34s

This commit is contained in:
2026-09-26 12:02:12 +02:00
parent 6cecbcf7c2
commit 8f8c662e5e
8 changed files with 30 additions and 20 deletions
+2 -1
View File
@@ -32,11 +32,12 @@ jobs:
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ${{ env.IMAGE }} images: ${{ env.IMAGE }}
# main-<sha>-<unix time> sorts by build time, for Flux image automation
tags: | tags: |
type=raw,value=latest,enable={{is_default_branch}} 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={{version}}
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
type=sha,format=short
- name: Build and push - name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
+17 -10
View File
@@ -1,7 +1,8 @@
# Heatpump cycle analysis # Interval Viz
A small static web app that visualises when a heat pump compressor is running, A small static web app that visualises on/off intervals, such as when a heat
based on Home Assistant history exports (`binary_sensor.*` on/off states). 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; - Interactive timeline (pan, zoom, mouse-wheel, quick ranges 6 h / 24 h / 3 d / 7 d;
double-click or Esc resets the zoom) double-click or Esc resets the zoom)
@@ -87,19 +88,25 @@ docker compose up -d --build
Open <http://localhost:8080> and log in as `dev` / `dev`. These development Open <http://localhost:8080> and log in as `dev` / `dev`. These development
credentials are set in `docker-compose.yml`. The host port can be changed with 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 ## CI: build and push
`.gitea/workflows/docker.yml` builds the image with Gitea Actions and pushes it `.gitea/workflows/docker.yml` builds the image with Gitea Actions and pushes it
to the Harbor registry as `registry.traberph.de/public/interval_viz`. to the Harbor registry as `registry.traberph.de/public/interval_viz`.
| Trigger | Tags pushed | | Trigger | Tags pushed |
|--------------------|-----------------------------------| |--------------------|------------------------------------------------------|
| push to `main` | `latest`, `sha-<short>` | | push to `main` | `latest`, `main-<sha>-<unix time>` (e.g. `main-6cecbcf-1790415657`) |
| tag `v1.2.3` | `1.2.3`, `1.2`, `sha-<short>` | | tag `v1.2.3` | `1.2.3`, `1.2` |
| pull request | build only, nothing pushed | | pull request | build only, nothing pushed |
| manual dispatch | as for the selected ref | | 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<ts>[0-9]+)$'`, `extract: '$ts'`, `numerical: asc`.
Old tags are cleaned up by a tag retention policy in Harbor, not by this workflow.
Setup: Setup:
+4 -2
View File
@@ -1,10 +1,12 @@
name: interval_viz
services: services:
heatpump: interval_viz:
build: . build: .
image: registry.traberph.de/public/interval_viz:latest image: registry.traberph.de/public/interval_viz:latest
restart: unless-stopped restart: unless-stopped
ports: ports:
- "${HEATPUMP_PORT:-8080}:80" - "${INTERVAL_VIZ_PORT:-8080}:80"
environment: environment:
BASIC_AUTH_USER: dev BASIC_AUTH_USER: dev
BASIC_AUTH_PASSWORD: dev BASIC_AUTH_PASSWORD: dev
+2 -2
View File
@@ -1,7 +1,7 @@
'use strict'; 'use strict';
const LANG_KEY = 'heatpump.lang'; const LANG_KEY = 'intervalviz.lang';
const DATASET_KEY = 'heatpump.dataset'; const DATASET_KEY = 'intervalviz.dataset';
const DATA_DIR = 'data/'; const DATA_DIR = 'data/';
const HOUR = 3600e3; const HOUR = 3600e3;
+2 -2
View File
@@ -4,7 +4,7 @@
const I18N = { const I18N = {
en: { en: {
locale: 'en-GB', locale: 'en-GB',
title: 'Heatpump compressor cycles', title: 'Interval Viz',
loading: 'loading…', loading: 'loading…',
dataHeading: 'Data', dataHeading: 'Data',
rangeHeading: 'Selected range', rangeHeading: 'Selected range',
@@ -45,7 +45,7 @@ const I18N = {
}, },
de: { de: {
locale: 'de-DE', locale: 'de-DE',
title: 'Wärmepumpe – Verdichterzyklen', title: 'Interval Viz',
loading: 'lädt…', loading: 'lädt…',
dataHeading: 'Daten', dataHeading: 'Daten',
rangeHeading: 'Ausgewählter Zeitraum', rangeHeading: 'Ausgewählter Zeitraum',
+2 -2
View File
@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Heatpump Cycles</title> <title>Interval Viz</title>
<link rel="icon" href="favicon.svg" type="image/svg+xml"> <link rel="icon" href="favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<script src="vendor/plotly.min.js" defer></script> <script src="vendor/plotly.min.js" defer></script>
@@ -14,7 +14,7 @@
<body> <body>
<main> <main>
<header> <header>
<h1 data-i18n="title">Heatpump compressor cycles</h1> <h1 data-i18n="title">Interval Viz</h1>
<div class="header-right"> <div class="header-right">
<select id="dataset" hidden aria-label="Dataset"></select> <select id="dataset" hidden aria-label="Dataset"></select>
<span class="sub" id="source"></span> <span class="sub" id="source"></span>
+1 -1
View File
@@ -11,7 +11,7 @@ server {
gzip_comp_level 6; gzip_comp_level 6;
gzip_types text/css text/csv application/javascript application/json; gzip_types text/css text/csv application/javascript application/json;
auth_basic "Heatpump"; auth_basic "Interval Viz";
auth_basic_user_file /etc/nginx/.htpasswd; auth_basic_user_file /etc/nginx/.htpasswd;
location / { location / {