Docker Compose
docker compose up -d is the supported way to run Apple Juicer. It starts five services — Postgres, Redis, the FastAPI backend, the RQ worker, and the React frontend behind nginx — wired together and reading the same APPLE_JUICER_* configuration.
Before you start
Section titled “Before you start”- Docker Engine 24+ with the Compose v2 plugin (
docker compose, notdocker-compose). - Roughly 4 CPU cores and 4 GB RAM for comfortable indexing runs.
- Your Finder/iTunes backups under
./data, or another host path you bind-mount.
What’s in the box
Section titled “What’s in the box”docker-compose.ymlorchestrates the stack.Dockerfile.backendbuilds the shared backend + worker image (Python slim).Dockerfile.frontendbuilds the React app and serves it withnginx:alpine.data/is the default host directory mounted read-only into the backend and worker at/data/ios_backups.
Configuration
Section titled “Configuration”Compose maps a handful of friendly host variables onto the nested settings the app reads. Set them in your shell or a .env file next to docker-compose.yml:
APPLE_JUICER_API_TOKEN=your-token # → APPLE_JUICER_SECURITY__API_TOKENAPPLE_JUICER_BACKUP_HOST_PATH=/path/to/backups # mounted at /data/ios_backupsAPPLE_JUICER_DECRYPTED_HOST_PATH=/path/to/out # where decrypted data landsThe Postgres and Redis DSNs are constructed inside docker-compose.yml from POSTGRES_* and REDIS_PASSWORD, so you rarely set them by hand. Every value has a sensible default; the only one worth changing before anything real is the token.
Run it
Section titled “Run it”docker compose up -d --buildThese ports are published:
| Service | Port | Purpose |
|---|---|---|
| Frontend (nginx) | 5173 | React UI |
| Backend (uvicorn) | 8080 | REST API |
| Postgres | 5432 | Database (optional external access) |
| Redis | 6379 | Queue (optional external access) |
Confirm it came up: open http://localhost:5173, check curl http://localhost:8080/healthz, and look for Listening on default... in the worker logs.
Pointing at backups elsewhere
Section titled “Pointing at backups elsewhere”Set APPLE_JUICER_BACKUP_HOST_PATH and Compose mounts it for both the backend and the worker. To hard-code a path instead, edit the volume in docker-compose.yml:
backend: volumes: - /mnt/backups:/data/ios_backups:roKeep the mount read-only, and apply the same change to the worker so both services can read payloads.
Rebuilding just the frontend
Section titled “Rebuilding just the frontend”When you change React code, rebuild that one image and leave the rest running:
docker compose build frontenddocker compose up -d frontendTearing down
Section titled “Tearing down”docker compose down # stop and remove containersdocker compose down -v # also drop the Postgres volumeYour backups are never touched by any of this — they stay on the host directory you mounted.