7a91a37049
build / build (push) Successful in 3m4s
Deployments reachable outside a trusted LAN need some form of access control. Set FUELISH_API_KEY and the server requires a matching X-API-Key header on /jobs; unset, behavior is unchanged (no auth). The Android app gets a matching Settings field. This only checks the key - TLS termination is left to a reverse proxy in front of the server, not handled here.
44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
# Runs the pipeline as a long-lived HTTP API for the Android app, on top
|
|
# of the same tooling-container image the numbered host scripts use.
|
|
# `docker compose up` alone is enough: the api service waits for Ollama
|
|
# and pulls the model itself (see tooling-container/src/server.py).
|
|
#
|
|
# The numbered host scripts (0_run_ollama.sh, 1/2/3_*.sh) and
|
|
# test_batch.sh are untouched and remain the way to inspect/test the
|
|
# pipeline stage by stage; this is the additive "serve it for real" path.
|
|
#
|
|
# Usage: docker compose up -d
|
|
# API reachable at http://<this-host>:8080 from any device on the LAN.
|
|
#
|
|
# For a deployment reachable outside a trusted LAN, copy .env.example to
|
|
# .env and set FUELISH_API_KEY - every /jobs request then needs a
|
|
# matching X-API-Key header (see tooling-container/src/server.py).
|
|
# Unset (the default), the server has no auth, same as before. This
|
|
# server does not terminate TLS itself - put a reverse proxy in front of
|
|
# it for anything public.
|
|
services:
|
|
ollama:
|
|
image: ollama/ollama
|
|
volumes:
|
|
- fuelish-ollama-data:/root/.ollama
|
|
restart: unless-stopped
|
|
|
|
api:
|
|
build:
|
|
context: ./tooling-container
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- ollama
|
|
environment:
|
|
OLLAMA_URL: http://ollama:11434/api/chat
|
|
OLLAMA_BASE_URL: http://ollama:11434
|
|
OLLAMA_MODEL: qwen2.5:3b
|
|
FUELISH_API_KEY: ${FUELISH_API_KEY:-}
|
|
command: ["uvicorn", "server:app", "--app-dir", "/opt/app/src", "--host", "0.0.0.0", "--port", "8000"]
|
|
ports:
|
|
- "8080:8000"
|
|
|
|
volumes:
|
|
fuelish-ollama-data:
|
|
name: fuelish-ollama-data
|