Skip to content

Deployment

t957095 edited this page Jun 15, 2026 · 1 revision

Deployment

ShelfWise can be deployed locally, on a VPS, or in the cloud via Docker.

Docker (Recommended)

cd agents-league-shelfwise
docker-compose up --build

Access the app at http://localhost:8000/app.

Production Hardening

  • Use a reverse proxy (nginx, Caddy, Traefik) with HTTPS.
  • Set FOUNDRY_API_KEY and other secrets via environment variables, never in the image.
  • Mount shelfwise.db on a persistent volume.
  • Run the container as non-root (already configured in Dockerfile).

Example Caddyfile

shelfwise.example.com {
    reverse_proxy localhost:8000
}

Cloud Platforms

Fly.io

fly launch
fly deploy

Set secrets:

fly secrets set FOUNDRY_API_KEY=xxx

Render

  1. Connect the GitHub repo.
  2. Use the Dockerfile build path.
  3. Add environment variables in the Render dashboard.

Azure Container Apps

az containerapp up --name shelfwise --source .

Environment-Specific Configuration

Create a .env file or use your platform's secret manager for:

  • FOUNDRY_ENDPOINT
  • FOUNDRY_API_KEY
  • FOUNDRY_MODEL
  • BRAVE_API_KEY
  • GOOGLE_API_KEY
  • GOOGLE_CX

Database Persistence

ShelfWise uses SQLite by default. For production workloads:

  1. Mount the database file on persistent storage.
  2. Consider migrating to PostgreSQL if you need multi-instance concurrency.

Monitoring

Health and metrics endpoints:

  • /api/health
  • /api/metrics
  • /api/foundry/health

Set up uptime checks and alerting against /api/health.

Scaling Considerations

  • Scraping is I/O-bound and benefits from async concurrency.
  • Image verification is CPU-bound; scale horizontally if processing large batches.
  • SQLite is sufficient for single-instance deployments; switch to PostgreSQL for multiple writers.

Delivery-App Deployment Notes

When deploying for merchants who will upload POS CSVs to list on Uber Eats, DoorDash, or Grubhub:

  • Ensure CSV upload size limits accommodate large POS exports.
  • Consider asynchronous email/webhook notifications when large batches complete.
  • Provide clear export templates for each delivery platform.

Clone this wiki locally