A full-stack platform for spinning up GPU-powered AI coding sessions on Vast.ai. The system provisions remote GPU machines running Theia IDE, vLLM with GGUF models, and an nginx preview proxy.
The API server and dashboard each have their own fly.toml and Dockerfile. Both use
the monorepo root as the Docker build context so shared libraries resolve correctly.
- flyctl installed and authenticated
- A Fly.io account
# Launch once (creates the Fly.io app; answer prompts to skip auto-deploy)
fly launch \
--config artifacts/api-server/fly.toml \
--dockerfile artifacts/api-server/Dockerfile \
--name mizi-api \
--no-deploy
# Provision a Postgres database and attach it (sets DATABASE_URL automatically)
fly postgres create --name mizi-db --region ord
fly postgres attach mizi-db --app mizi-api
# Create the persistent volume for the SQLite memory database
# (1 GB is sufficient to start; resize with `fly volumes extend` later)
fly volumes create mizi_memory --app mizi-api --region ord --size 1
# Set the remaining secrets
# NVIDIA_NIM_API_KEY is the recommended AI provider (free tier available at build.nvidia.com).
# AI_INTEGRATIONS_OPENAI_* are only needed if you prefer a different OpenAI-compatible endpoint.
fly secrets set --app mizi-api \
VASTAI_API_KEY="<your vastai key>" \
NVIDIA_NIM_API_KEY="<your nvidia nim key>" \
VULTR_INFERENCE_API_KEY="<optional>" \
TOGETHER_API_KEY="<optional>" \
DEEPINFRA_API_KEY="<optional>"
# Deploy (run from the monorepo root so the build context is correct)
fly deploy --config artifacts/api-server/fly.toml \
--dockerfile artifacts/api-server/Dockerfile \
--build-context .After a successful deploy the API server is reachable at
https://mizi-api.fly.dev.
# Launch once
fly launch \
--config artifacts/dashboard/fly.toml \
--dockerfile artifacts/dashboard/Dockerfile \
--name mizi-dashboard \
--no-deploy
# Deploy — pass the API server URL as a build arg
fly deploy --config artifacts/dashboard/fly.toml \
--dockerfile artifacts/dashboard/Dockerfile \
--build-context . \
--build-arg VITE_API_BASE_URL=https://mizi-api.fly.devNaming convention:
VITE_API_BASE_URLfollows the patternhttps://<api-app-name>.fly.devwhere<api-app-name>is the Fly.io app name you chose when runningfly launchfor the API server (default:mizi-api). If you used a different name (e.g.mizi-api-staging), pass--build-arg VITE_API_BASE_URL=https://mizi-api-staging.fly.devat deploy time. You do not need to editfly.tomlto change the URL — the--build-argflag overrides the default baked into the file.In Replit dev mode (no
VITE_API_BASE_URLset) the dashboard automatically falls back to same-origin relative paths, so no local configuration is required.
After a successful deploy the dashboard is reachable at
https://mizi-dashboard.fly.dev.
Replace mizi-api with your actual API app name if you chose a different one
during fly launch.
# API server
fly deploy --config artifacts/api-server/fly.toml \
--dockerfile artifacts/api-server/Dockerfile \
--build-context .
# Dashboard (replace "mizi-api" if your API app has a different name)
fly deploy --config artifacts/dashboard/fly.toml \
--dockerfile artifacts/dashboard/Dockerfile \
--build-context . \
--build-arg VITE_API_BASE_URL=https://mizi-api.fly.devfly logs --app mizi-api
fly logs --app mizi-dashboardSee individual artifact READMEs. The project uses pnpm workspaces (the API server and dashboard). The Theia IDE is a separate npm project — see docker/mizi-theia/:
pnpm install
pnpm --filter @workspace/api-server run dev
pnpm --filter @workspace/dashboard run devSee .env.example for the full list of secrets and their descriptions.