mirror of
https://github.com/tiennm99/artemis-demo-agent.git
synced 2026-08-16 14:22:27 +00:00
2.6 KiB
2.6 KiB
Artemis Deployment Guide
Runtime
- Web: SvelteKit on Vercel
- Data/Auth/Storage: hosted Supabase
- Production schema:
artemis - Preview schema:
artemis_preview - Production buckets:
artemis-report-images,artemis-marketplace-images - Preview buckets:
artemis_preview-report-images,artemis_preview-marketplace-images
No production flow uses SQLite or local filesystem persistence.
Required Env Vars
PUBLIC_SUPABASE_URL=
PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
ARTEMIS_ENV=preview
ARTEMIS_SUPABASE_SCHEMA=artemis_preview
ARTEMIS_AUTH_PROVIDER=google
ARTEMIS_ADMIN_EMAILS=minhtienit99@gmail.com,minhnguyetawf@gmail.com
ARTEMIS_STORAGE_BUCKET_PREFIX=artemis_preview
Use Vercel project env vars. Do not commit real .env files.
Supabase Setup
- Create hosted Supabase project.
- Enable Google OAuth provider in Supabase Auth.
- Configure OAuth redirect URLs for local, preview, and production:
http://127.0.0.1:5173/account- Vercel preview
/account - production
/account
- Apply
supabase/migrations/202606230001_artemis_core.sql. - Ask both admin emails to sign in once.
- Run
supabase/seed.sql. - Confirm RLS is enabled on Artemis tables.
- Confirm storage buckets are private.
Local
pnpm install
pnpm dev
Without Supabase env vars, Artemis uses a local in-memory fallback user for development only.
Preview
Set preview env vars:
ARTEMIS_ENV=preview
ARTEMIS_SUPABASE_SCHEMA=artemis_preview
ARTEMIS_STORAGE_BUCKET_PREFIX=artemis_preview
Run smoke:
pnpm check
pnpm test
pnpm build
Check:
GET /healthPOST /invocations/api/statereturns retired410- Google sign-in redirects correctly
- private image upload succeeds
Production
Set production env vars:
ARTEMIS_ENV=production
ARTEMIS_SUPABASE_SCHEMA=artemis
ARTEMIS_STORAGE_BUCKET_PREFIX=artemis
Cut over only after preview smoke passes and admin seed roles are present.
Limits
- One image per record
- Max image size: 2MB
- MIME allowlist: JPEG, PNG, WebP, GIF
- Signed URL TTL: 10 minutes
- Daily caps are documented in code constants and enforced at schema/repository hardening stage
Supabase Pro Trigger
Upgrade from Free when any becomes real:
- recovery expectations matter
- storage/egress approaches free-tier limits
- uptime needs become business-critical
- launch risk makes project pausing unacceptable
Rollback
Old static/Python demo code remains under legacy/static-python-demo/ for reference. Rollback means redeploying that legacy runtime separately; do not re-enable legacy /api/* in the SvelteKit production app.