Docker updates

This commit is contained in:
fireshaper 2026-07-02 14:56:22 -04:00
parent b811b5c1a2
commit 1368dc5ec4
3 changed files with 15 additions and 2 deletions

View File

@ -30,7 +30,7 @@ Frontend (`mykindlebox/client`):
- `npm run build` — production build to `dist/`
- `npm run lint` — ESLint
Deployment: `docker compose up --build` from `mykindlebox/` serves the app on port 8080 (nginx serves the built client and reverse-proxies `/api` + `/uploads` to the Node server). Set `MYKINDLEBOX_PASSWORD` (e.g. in `mykindlebox/.env`) to require a login; if unset, auth is disabled.
Deployment: `docker compose up --build` from `mykindlebox/` serves the app on port 8080 by default (nginx serves the built client and reverse-proxies `/api` + `/uploads` to the Node server). Configure via `mykindlebox/.env`: `MYKINDLEBOX_PORT` overrides the host port, and `MYKINDLEBOX_PASSWORD` requires a login (if unset, auth is disabled).
### Conventions

View File

@ -88,6 +88,17 @@ The app is served on **http://localhost:8080** — nginx serves the built client
and reverse-proxies `/api` + `/uploads` to the Node server. The SQLite database
and uploaded photos live in the `server-data` Docker volume.
To serve on a different host port, set `MYKINDLEBOX_PORT` (e.g. in a `.env` file
next to `docker-compose.yml`, alongside `MYKINDLEBOX_PASSWORD`):
```env
MYKINDLEBOX_PORT=3000
```
Then re-run `docker compose up -d` — the app is served on that port instead of
8080. (Only the host side changes; inside the compose network nginx still
listens on 80.)
### Authentication
Auth is **optional** and off by default. To require a login, set

View File

@ -24,7 +24,9 @@ services:
client:
build: ./client
ports:
- "8080:80"
# Host port is configurable: set MYKINDLEBOX_PORT (e.g. in the same .env
# as MYKINDLEBOX_PASSWORD) to serve on a different port. Defaults to 8080.
- "${MYKINDLEBOX_PORT:-8080}:80"
# Wait for the API to answer /health before starting nginx, so the first
# page load after `docker compose up` can't hit a 502 from a still-booting
# server.