brokeless: fully local by default, and a README for it

- BROKE_OFFLINE=1 (on in Docker) turns off the GitHub update check and the
  exchange-rate fetch, so the server makes no calls out
- auto-update in scripts/start.mjs pulls from your own repo (origin), never upstream
- install.sh points at brokeless; drop the workflow that merged upstream by itself
- compose project and image are named brokeless
- README: what changed from broke, how to run it, how to review upstream

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MangaValkandClaude Opus 5.5 committed 2026-11-17 14:08:42 +01:00
1 parent 861e65021f
commit cec3b15c2c
9 files changed
+139 -94

No files matched your search

+6 -16
View File
@@ -1,6 +1,6 @@
# Run broke fully on your own server
# brokeless in Docker
Everything runs here: broke, its Postgres database, sign-in and the REST API (the parts of Supabase it uses), a mail catcher for sign-in links, and optionally Ollama for AI. No Supabase cloud, no Vercel, no auto-update.
Everything runs here: the app, its Postgres database, sign-in and the REST API (the parts of Supabase it uses), a mail catcher for sign-in links, and optionally Ollama for AI. No Supabase cloud, no Vercel, no auto-update.
| Container | What it does | Port |
| --- | --- | --- |
@@ -26,7 +26,7 @@ Everything runs here: broke, its Postgres database, sign-in and the REST API (th
docker run --rm -v "$PWD":/w -w /w node:22-alpine node docker/setup.mjs --url http://192.168.1.10:3000
```
On Unraid, edit `docker/.env` and set `DATA_DIR=/mnt/user/appdata/broke`.
On Unraid, edit `docker/.env` and set `DATA_DIR=/mnt/user/appdata/brokeless`.
2. Start it:
@@ -34,7 +34,7 @@ Everything runs here: broke, its Postgres database, sign-in and the REST API (th
docker compose -f docker/docker-compose.yml up -d --build
```
With local AI as well: add `--profile ai`, then pull a model, for example `docker exec broke-ollama-1 ollama pull qwen3:8b`.
With local AI as well: add `--profile ai`, then pull a model, for example `docker exec brokeless-ollama-1 ollama pull qwen3:8b`.
3. Open your address, type your email, then open Mailpit on port 8025 (user `broke`, password `MAIL_PASSWORD` in `docker/.env`) and click the link.
@@ -53,18 +53,8 @@ Install the Compose Manager plugin, add a stack, and point it at this folder's `
- Back up `DATA_DIR/db` and `docker/.env` together. The database is useless without the secrets in `.env`.
- Database changes in `supabase/migrations` apply each time broke starts.
## Updating from upstream
## Updating
This copy never pulls by itself. To see and pick what's new:
```bash
git fetch upstream
```
```bash
git log --oneline main..upstream/main
```
Review, then `git merge upstream/main` (or `git cherry-pick <commit>` for single ones), and rebuild with `up -d --build`.
Nothing updates by itself. See [Update](../README.md#update) in the main README for pulling your own changes and reviewing upstream ones.
`docker/db/*.sql` come from Supabase's self-hosting setup (Apache-2.0).
+6 -4
View File
@@ -1,11 +1,11 @@
# broke with everything it needs, all on your own server. See README.md in this folder.
# brokeless: broke with everything it needs, all on your own server. See README.md in this folder.
# node docker/setup.mjs --url http://192.168.1.10:3000 (once: writes docker/.env with fresh secrets)
# docker compose -f docker/docker-compose.yml up -d --build
# ... --profile ai up -d (also runs Ollama for local AI)
#
# Supabase parts (db, auth, rest) follow Supabase's own self-hosting setup, cut down to what broke uses.
name: broke
name: brokeless
x-hardening: &hardening
restart: unless-stopped
@@ -33,11 +33,13 @@ services:
args:
NEXT_PUBLIC_SUPABASE_URL: ${PUBLIC_URL}
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${ANON_KEY}
image: broke:local
image: brokeless:local
cap_drop: [ALL]
environment:
NEXT_PUBLIC_SUPABASE_URL: ${PUBLIC_URL}
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY: ${ANON_KEY}
# No calls out: no update check, no exchange rates. Set to 0 for rates across currencies (frankfurter.dev).
BROKE_OFFLINE: ${BROKE_OFFLINE:-1}
SUPABASE_SERVICE_ROLE_KEY: ${SERVICE_ROLE_KEY}
# Inside the stack only, so no SSL (broke turns SSL on unless the URL says otherwise).
SUPABASE_DB_URL: postgresql://postgres:${POSTGRES_PASSWORD}@db:5432/postgres?sslmode=disable
@@ -149,7 +151,7 @@ services:
MP_UI_AUTH: broke:${MAIL_PASSWORD}
MP_MAX_MESSAGES: 200
# Local AI, full detail stays here. Start with --profile ai, then: docker exec broke-ollama-1 ollama pull <model>
# Local AI, full detail stays here. Start with --profile ai, then: docker exec brokeless-ollama-1 ollama pull <model>
ollama:
<<: *hardening
image: ollama/ollama:latest
+4 -1
View File
@@ -39,7 +39,7 @@ writeFileSync(file, `# Made by docker/setup.mjs. Keep it private and backed up:
# The address you open broke on. Built into the app: change it and rebuild (up -d --build).
PUBLIC_URL=${url}
HTTP_PORT=${port}
# Where the database (and Ollama models) live. On Unraid, for example /mnt/user/appdata/broke
# Where the database (and Ollama models) live. On Unraid, for example /mnt/user/appdata/brokeless
DATA_DIR=./data
POSTGRES_PASSWORD=${hex(24)}
@@ -60,6 +60,9 @@ MAIL_PASSWORD=${hex(12)}
# After your first sign-in, set this to true and run up -d again.
DISABLE_SIGNUP=false
# 1 = no calls out (no update check, no exchange rates). 0 = fetch ECB rates for totals across currencies.
BROKE_OFFLINE=1
# Local AI (docker compose --profile ai). Empty model = the first one installed.
LOCAL_LLM_BASE_URL=http://ollama:11434/v1
LOCAL_LLM_MODEL=