Build container image in CI, bake in datasets, configure auth via env
Build image / build (push) Successful in 3m18s
Build image / build (push) Successful in 3m18s
- Dockerfile bakes the app and every CSV in data/ into an nginx image - UI discovers data/*.csv via nginx JSON autoindex and offers a dropdown when there is more than one dataset - docker-entrypoint.d/40-basic-auth.sh creates .htpasswd from BASIC_AUTH_USER / BASIC_AUTH_PASSWORD(_FILE) and refuses to start without credentials; replaces set-password.sh - Gitea Actions workflow builds and pushes registry.traberph.de/public/interval_viz (latest, sha-*, semver) - Escape resets the chart zoom Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+5
-4
@@ -9,7 +9,7 @@ server {
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/css text/csv application/javascript;
|
||||
gzip_types text/css text/csv application/javascript application/json;
|
||||
|
||||
auth_basic "Heatpump";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
@@ -19,9 +19,10 @@ server {
|
||||
include /etc/nginx/security-headers.conf;
|
||||
}
|
||||
|
||||
# the CSV is mounted separately so it can be replaced without touching the app
|
||||
location = /history.csv {
|
||||
alias /data/history.csv;
|
||||
# data/ is listed as JSON so the UI can discover the CSV files
|
||||
location /data/ {
|
||||
autoindex on;
|
||||
autoindex_format json;
|
||||
default_type text/csv;
|
||||
include /etc/nginx/security-headers.conf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user