Skip to content

Commit aa25cf5

Browse files
committed
fix(ha): s6 init, optional Google/Drive options, env parity with Docker
Made-with: Cursor
1 parent e23262c commit aa25cf5

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

config.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,24 @@ description: "Financial Overview (מבט כלכלי) — scrape Israeli banks an
66
url: "https://github.com/yohaybn/Israeli-Financial-Overview"
77
# Supervisor builds with this folder as context (repo root when the full repository is installed under /addons/<name>/).
88
startup: application
9+
# Required for Home Assistant s6 base images: Docker’s init must not wrap /init, or s6 throws "can only run as pid 1".
10+
init: false
911
arch:
1012
- aarch64
1113
- amd64
1214
- armv7
1315
ingress: true
16+
# Must match the listen `port` option (below) for sidebar / Ingress to reach the app.
1417
ingress_port: 3000
1518
ingress_entry: /
1619
options:
17-
google_client_id: ""
18-
google_client_secret: ""
19-
drive_folder_id: ""
20+
port: 3000
2021
schema:
21-
google_client_id: str
22-
google_client_secret: str
23-
drive_folder_id: str
22+
port: port
23+
google_client_id: str?
24+
google_client_secret: password?
2425
google_redirect_uri: str?
25-
gemini_api_key: str?
26+
drive_folder_id: str?
27+
gemini_api_key: password?
28+
telegram_bot_token: password?
29+
eodhd_api_token: str?

run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ if [ -f "$CONFIG_PATH" ]; then
1818
fi
1919
}
2020

21+
if [ -z "$PORT" ]; then
22+
export PORT="$(jq -r '.port // 3000' "$CONFIG_PATH")"
23+
fi
24+
2125
export_json_key "google_client_id" "GOOGLE_CLIENT_ID"
2226
export_json_key "google_client_secret" "GOOGLE_CLIENT_SECRET"
2327
export_json_key "google_redirect_uri" "GOOGLE_REDIRECT_URI"
2428
export_json_key "drive_folder_id" "DRIVE_FOLDER_ID"
2529
export_json_key "gemini_api_key" "GEMINI_API_KEY"
30+
export_json_key "telegram_bot_token" "TELEGRAM_BOT_TOKEN"
31+
export_json_key "eodhd_api_token" "EODHD_API_TOKEN"
2632

2733
fi
2834

0 commit comments

Comments
 (0)