Setting Up Production Infrastructure: From Zero to Deployed
Today marked a significant milestone: taking the portfolio from local development to a fully deployed, production-ready infrastructure with custom domains and auto-deployments.
The Goalโ
Create a professional presence for showcasing AI-powered applications:
- zeroleaf.dev - Portfolio landing page
- docs.zeroleaf.dev - Project documentation (Docusaurus)
- api.zeroleaf.dev - Backend API (FastAPI)
Domain & DNS Setupโ
Purchased zeroleaf.dev and configured Cloudflare as the DNS provider. The name comes from "Aparna" (Sanskrit: without even a leaf) - representing minimalism and focus.
Cloudflare Configurationโ
- DNS management with proxied records
- SSL/TLS encryption (Full mode)
- CDN caching for static assets
Hosting Decisionsโ
Static Sites: Cloudflare Pagesโ
Chose Cloudflare Pages over Vercel for the portfolio and docs:
- Free tier with generous limits
- Native Cloudflare integration
- Git-based auto-deployments
Backend API: Railwayโ
Selected Railway over Render for the FastAPI backend:
- No cold starts (always-on containers)
- Simple deployment from GitHub
- Custom domain support on free tier
- Better suited for AI workloads that need consistent response times
Auto-Deployment Pipelineโ
All three services now auto-deploy on git push:
| Service | Platform | Trigger |
|---|---|---|
| Portfolio | Cloudflare Pages | Push to zeroleaf-portfolio |
| Docs | Cloudflare Pages | Push to zeroleaf-docs |
| API | Railway | Push to IngredientScanner |
Key Learningsโ
-
Cloudflare Pages vs Workers: Pages is for static sites with git integration; Workers is for serverless functions. Easy to confuse in the dashboard.
-
Railway vs Serverless: For AI applications with LLM calls, always-on containers beat serverless. Cold starts + API latency = poor UX.
-
Docusaurus Configuration: The
future.v4flag enables upcoming features but some config options aren't fully supported in v3.x yet.
What's Nextโ
- Add more projects to the portfolio
- Implement CI/CD testing before deployments
- Set up monitoring and analytics
