Deployment¶
Production deployment guide for Mystery Gift platform services.
Overview¶
Mystery Gift platform services are deployed to:
- Cloudflare Workers (Serverless) - Marketplace API, Landing page
- Hetzner VPS (PM2) - Livestream Server
- Phala TEE (CVMs) - Randomness, Vault, Miss AI, Pokemon TCG API
Pre-deployment Checklist¶
- [ ] Ensure all
.envvariables are set for production - [ ] Run type-check:
pnpm type-check - [ ] Run tests:
pnpm test(if available) - [ ] Backup existing database (if applicable)
- [ ] Verify TEE service URLs
deploying-to-cloudflare-workers¶
Marketplace API¶
Landing Page¶
Deploying-to-hetzner-vps¶
Livestream Server¶
Deploying-to-phala-tee¶
Randomness Service¶
cd services/verifiable-randomness-service
phala deploy --cvm-id <cvm_id> --compose phala-compose.yaml -e .env.production
Vault Service¶
cd services/verifiable-wallet-service
phala deploy --cvm-id <cvm_id> --compose phala-compose.yaml -e .env.production
Miss AI¶
Post-deployment Verification¶
-
Health checks:
-
https://agent.mysterygift.fun/health(Miss AI) https://rng.mysterygift.fun/health(Randomness)-
https://vault.mysterygift.fun/health(Vault) -
Test raffle flow manually on stream overlay
-
Verify winner announcements on Twitter
Monitoring¶
Use PM2 logs for livestream server and check Cloudflare dashboard for API metrics.
Next Steps¶
- Testing - Post-deployment testing