mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 05:12:26 +00:00
All three deployment methods bound 0.0.0.0:8000 with no API key, so following
the README produced a server reachable from any device on the network with no
auth. `check_bind_safety` already refuses to start a non-loopback bind without
a key (so these configs actually failed to start) — this wires the key in so
the documented path yields a *working, authenticated* server.
- docker-compose.yml: require `OPENJARVIS_API_KEY` via `${VAR:?...}` so
`docker compose up` fails fast when unset; added `deploy/docker/.env.example`
(un-ignored in .gitignore).
- systemd: add `EnvironmentFile=/etc/openjarvis/env` (no `-` prefix, so a
missing key file blocks startup rather than exposing an open server).
- launchd: bind `127.0.0.1` by default (the personal-device default — no
network exposure, no key needed) with a documented, commented opt-in to
0.0.0.0 + `OPENJARVIS_API_KEY`. Avoids shipping a usable default credential.
- Docs (docker/systemd/launchd) updated with the key-setup step.
- Tests assert each config can't reintroduce an open server, plus
`check_bind_safety` behavior across loopback/public × key/no-key.
Closes #221
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
36 lines
986 B
YAML
36 lines
986 B
YAML
services:
|
|
jarvis:
|
|
build:
|
|
context: ../..
|
|
dockerfile: deploy/docker/Dockerfile
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- OPENJARVIS_ENGINE_DEFAULT=ollama
|
|
- OLLAMA_HOST=http://ollama:11434
|
|
# The container binds 0.0.0.0, so an API key is REQUIRED. Compose fails
|
|
# fast if OPENJARVIS_API_KEY is unset (set it in deploy/docker/.env —
|
|
# see .env.example, or `export` it). Generate one: `jarvis auth generate-key`.
|
|
- OPENJARVIS_API_KEY=${OPENJARVIS_API_KEY:?OPENJARVIS_API_KEY must be set (see deploy/docker/.env.example)}
|
|
depends_on:
|
|
ollama:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
ports:
|
|
- "11434:11434"
|
|
volumes:
|
|
- ollama-models:/root/.ollama
|
|
healthcheck:
|
|
test: ["CMD", "ollama", "list"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
start_period: 10s
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
ollama-models:
|