Skip to content

Deploy to production and configure patch.tfcg.dev domain #26

@drftstatic

Description

@drftstatic

Production Deployment & Domain Setup

Subdomain Decision

Chosen: patch.tfcg.dev

Deployment Options

Option 1: Azure Container Apps (Original Plan)

Pros: Full control, integrates with existing Azure resources (Cosmos DB)
Steps:

  1. Create Container App environment
  2. Build & push Docker image to ACR/GHCR
  3. Deploy Container App
  4. Get FQDN (e.g., patchpath.niceforest-12345678.eastus.azurecontainerapps.io)
  5. Point Cloudflare CNAME to Azure URL

Option 2: Vercel (Fast MVP Path) ⚡ RECOMMENDED

Pros: Next.js native, instant deploy, auto SSL/CDN
Steps:

  1. `vercel --prod`
  2. Get URL (e.g., `patchpath-ai.vercel.app`)
  3. Point Cloudflare to Vercel
  4. Migrate to Azure later if needed

Option 3: Azure Static Web Apps

Pros: Free tier, GitHub Actions integration
Cons: More limited than Container Apps

Cloudflare DNS Setup

Required DNS Record:

```
Type: CNAME
Name: patch
Target: (TBD after deployment)
Proxy: Proxied (orange cloud)
TTL: Auto
```

SSL/TLS Configuration:

  • Mode: Full (strict)
  • Auto-provision takes 5-15 minutes

Optional Optimizations:

  • Speed → Auto Minify (HTML, CSS, JS)
  • Caching → Browser Cache TTL: 4 hours
  • Security → Bot Fight Mode

Action Items

  • Choose deployment platform (Vercel vs Azure)
  • Deploy application
  • Get production URL
  • Configure Cloudflare DNS
  • Verify SSL certificate
  • Test production deployment

Dependencies

  • Requires `.env` variables in deployment platform:
    • `ANTHROPIC_API_KEY`
    • `AZURE_COSMOS_CONNECTION_STRING`
    • Clerk authentication keys
    • (Check `.env.example` for full list)

Timeline

  • Vercel path: ~30 minutes total
  • Azure path: ~2 hours (container setup, registry, deployment)

Notes

  • Domain registered at domain host, needs Cloudflare nameservers configured
  • Production deployment will enable public testing of vision system
  • Can use Vercel for MVP, migrate to Azure for v1.0 later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions