Skip to content

Commit 2a3c8e4

Browse files
committed
Home Assistant add-on: default port 9203, bump 1.0.2
- ingress_port, ENV PORT, EXPOSE aligned with add-on - server package version; README/DEPLOYMENT notes (9203 vs 3000) Made-with: Cursor
1 parent aa25cf5 commit 2a3c8e4

5 files changed

Lines changed: 16 additions & 11 deletions

File tree

DEPLOYMENT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,6 @@ In the Add-on "Configuration" tab, fill in your Google OAuth details and Drive f
122122
- `google_redirect_uri` (optional)
123123
- `gemini_api_key` (optional; for AI features)
124124

125+
**Internal HTTP port (add-on only):** **9203** — set in `config.yaml` as `ingress_port` and in the add-on `Dockerfile` as `ENV PORT=9203` (must match for Ingress; different from the default 3000 used by `Dockerfile.app` / vanilla Docker).
126+
125127
Start the add-on and open the Web UI from the sidebar.

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ RUN npm install
4141
# Build workspaces in order
4242
RUN npm run build -w shared
4343
# Supervisor passes BUILD_VERSION from config.yaml version; CI may pass VITE_APP_BUILD_VERSION (tag@sha) instead.
44-
ARG BUILD_VERSION=1.0.0
44+
ARG BUILD_VERSION=1.0.2
4545
ARG VITE_APP_BUILD_VERSION=
4646
ARG VITE_INSTALL_KIND=docker
4747
ENV VITE_INSTALL_KIND=docker
@@ -60,6 +60,7 @@ COPY run.sh /
6060
RUN chmod a+x /run.sh
6161

6262
ENV DATA_DIR=/data
63-
ENV PORT=3000
63+
ENV PORT=9203
64+
EXPOSE 9203
6465

6566
CMD [ "/run.sh" ]

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ npm run setup
115115
npm run dev
116116
```
117117

118-
This runs the API and the Vite dev client together (see root `package.json`). The UI is typically served on **`http://127.0.0.1:5173`** with the API proxied; for Docker/Home Assistant the app is often exposed on **port 3000** (see [DEPLOYMENT.md](DEPLOYMENT.md)).
118+
This runs the API and the Vite dev client together (see root `package.json`). The UI is typically served on **`http://127.0.0.1:5173`** with the API proxied; for normal Docker/Compose the app is often on **port 3000**; the **Home Assistant** add-on uses **9203** internally to match `ingress_port` (see [DEPLOYMENT.md](DEPLOYMENT.md)).
119119

120120
### Docker
121121

@@ -145,6 +145,8 @@ CI workflows set `VITE_APP_BUILD_VERSION` and `VITE_INSTALL_KIND` automatically
145145
2. Install **Financial Overview** and configure OAuth/Drive (and other options) in the add-on **Configuration** tab.
146146
3. Start the add-on and open the Web UI from the sidebar.
147147

148+
**Port / Ingress:** Home Assistant’s sidebar proxy (Ingress) always uses the **internal** port defined in the add-on’s `config.yaml` (currently **9203**). There is no separate **port** option, because the Supervisor would still connect to that static port — changing a “port” in the UI would break Ingress. To use another **internal** port, only a fork that changes `ingress_port` in `config.yaml` and `PORT` in the `Dockerfile` is supported.
149+
148150
The Supervisor build uses the **entire Git repository** as the Docker context (`config.yaml` and `Dockerfile` live at the repo root). If you use **Samba/SSH** to install a local copy, clone or copy the **full project** into `/addons/<folder>/`, not only a `ha-addon` subfolder.
149151

150152
Details: [DEPLOYMENT.md](DEPLOYMENT.md).

config.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Financial Overview"
22
# Must match server/package.json "version". Supervisor passes this as BUILD_VERSION to the Docker build.
3-
version: "1.0.0"
3+
version: "1.0.2"
44
slug: "bank_scraper"
55
description: "Financial Overview (מבט כלכלי) — scrape Israeli banks and upload to Google Drive"
66
url: "https://github.com/yohaybn/Israeli-Financial-Overview"
@@ -13,13 +13,12 @@ arch:
1313
- amd64
1414
- armv7
1515
ingress: true
16-
# Must match the listen `port` option (below) for sidebar / Ingress to reach the app.
17-
ingress_port: 3000
16+
# Sidebar / Ingress proxy: Supervisor uses ONLY this static value (it does not read a user "port" from options).
17+
# The app must listen on the same port: ENV PORT=9203 in the Dockerfile, not configurable per install.
18+
ingress_port: 9203
1819
ingress_entry: /
19-
options:
20-
port: 3000
20+
options: {}
2121
schema:
22-
port: port
2322
google_client_id: str?
2423
google_client_secret: password?
2524
google_redirect_uri: str?

server/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "server",
3-
"version": "1.0.0",
3+
"version": "1.0.2",
44
"type": "module",
55
"description": "",
66
"main": "dist/index.js",
@@ -35,7 +35,8 @@
3535
"socket.io": "^4.8.1",
3636
"telegraf": "^4.16.3",
3737
"uuid": "^13.0.0",
38-
"winston": "^3.17.0"
38+
"winston": "^3.17.0",
39+
"yahoo-finance2": "^2.14.0"
3940
},
4041
"devDependencies": {
4142
"@types/better-sqlite3": "^7.6.13",

0 commit comments

Comments
 (0)