Migration Guide
Moving an existing project to Virke? This guide helps you analyze your current setup and plan the migration.
Step 1: Analyze Your Project
Before migrating, you need a clear picture of your current stack. Use this prompt with an AI assistant (or work through it manually) in your project directory:
Analyze this project and give me a detailed summary of:
- Build system: What builds the site or app? (Vite, Astro, Next.js, plain HTML, etc.)
- Output: Where does the built output end up? (
dist/,build/,out/, etc.)- Runtime processes: Are there any background processes? (scrapers, workers, cron jobs, etc.)
- What triggers them? (cron, manual, CI, etc.)
- Where do they write data? (local files, database, API, JSON, etc.)
- Does the site read this data at build time or runtime?
- Hosting: How is it currently deployed? (Vercel, Netlify, VPS, etc.)
- Dependencies: Any databases, APIs, or external services?
- Config files: List all config files (
package.json,tsconfig.json, etc.)Format the output as a migration checklist so I can convert this to Virke.
Step 2: Map to Virke Products
Once you have your project analysis, map each part to the right Virke product:
| Your current setup | Virke product | Docs |
|---|---|---|
| Static site (HTML, CSS, JS) | Virke Sites | Sites docs |
| Server-side app or API | Virke Run | Run docs |
| Database (Postgres, MySQL, SQLite) | Virke DB | DB docs |
| Key-value store (Redis, etc.) | Virke KV | KV docs |
| File/object storage (S3, etc.) | Virke OS3 | OS3 docs |
| Cron jobs or scheduled tasks | Virke Cron | Cron docs |
| CI/CD pipeline | GitHub integration or CI/CD |
Step 3: Initialize Your Virke Project
# Install the CLI
bun install -g @virke/cli
# Authenticate
virke login
# Initialize in your project directory
virke init
This creates a virke.toml in your project root. See the config reference for all options.
Step 4: Configure and Deploy
Static sites
Set your build command and output directory in virke.toml:
[project]
name = "my-site"
type = "sites"
[build]
command = "bun run build"
output = "dist"
Then deploy:
virke deploy
Apps with background processes
If your project has scrapers, workers, or cron jobs, you'll likely need to split it:
- Static site — deploy as Virke Sites
- Background processes — migrate to Virke Cron for scheduled tasks, or Virke Run for always-on workers
- Data storage — use Virke DB or Virke KV instead of local files
Framework-specific guides
See Framework Support for setup guides for Next.js, SvelteKit, Remix, Astro, Hono, and Vite.
Common Migration Patterns
Local JSON files to Virke DB
If your build or scraper writes JSON files that the site reads at build time:
- Move the data into Virke DB
- Update the scraper to write to Virke DB via the SDK
- Read from Virke DB at build time or at the edge with Virke Run
Cron jobs to Virke Cron
If you run scheduled scripts (e.g., scrapers on a VPS cron):
- Wrap the script as a Virke Cron handler
- Define the schedule in
virke.toml - Deploy — Virke handles scheduling at the edge
Vercel/Netlify to Virke Sites
- Keep your existing build command
- Set the output directory in
virke.toml - Run
virke deploy— your site is now on Fastly's edge network
Need Help?
- CLI reference — full command list
- Configuration — all
virke.tomloptions - Getting Started — quickstart from scratch