Skip to main content

Production

Fly.io

The project includes a fly.toml configuration. Make sure flyctl is installed and you're logged in.

fly auth login
fly deploy

Docker

Build and run the production image:

docker build -t epydemix-api .
docker run -p 8000:8000 epydemix-api

Google Cloud Run

Deploy from source with Cloud Build:

gcloud run deploy epydemix-api --source . --region=us-east1 \
--cpu=2 --concurrency=2 --max-instances=20 --allow-unauthenticated

The simulation endpoint is CPU-bound, so set --concurrency to match the worker/vCPU count, otherwise requests queue on an overloaded instance instead of scaling out. See Google Cloud Run for the full guide and tuning rationale.

Environment variables

See Configuration for all available settings.