Tus qauv nyob hauv ntu 5 ntawm docs/architecture/23-ops.md. Vercel khiav web tier xwb. Lwm yam khiav ntawm companion host uas koj tswj, thiab yuav tsum muaj.
Xwm txheej hauv release no
Kev teeb tsa twb npaj lawm (apps/web/vercel.json, Nitro preset vercel thiab kev kuaj thaum pib). Vercel xav tau file storage sib koom (QUIRE_STORAGE_DRIVER=s3 lossis azure), realtime driver uas siv tau hla function instance (QUIRE_REALTIME_DRIVER=sse lossis centrifugo) thiab email provider siv HTTP. Yog tsis muaj, web tier tsis kam pib thiab log teev txhua qhov chaw uas ploj.
Cov feem
| Feem | Qhov chaw khiav |
|---|---|
web |
Vercel Functions, Bun runtime: nplooj, REST, MCP, LTI thiab webhook txais |
worker, scheduler, collab, content |
Companion host: Fly, Railway, ECS lossis koj Docker host nrog docker/compose.yaml |
| Postgres | Sab nraud, tom qab transaction pooler: Neon, Supabase lossis RDS nrog PgBouncer |
| Ntaub ntawv | S3 lossis R2. Tsis muaj disk ruaj khov |
| Background jobs | Muab tso nrog pg-boss hauv transaction thov; companion worker khiav. Yog companion worker muaj QUIRE_QUEUE_DRIVER=vercel, light jobs (notification tsis teem caij thiab webhook xa) mus ntawm Vercel Queues (VERCEL_QUEUE_REGION, VERCEL_QUEUE_TOKEN), kom tsis polling pooled Postgres rau lawv |
| Recurring jobs | Companion scheduler. Tsis muaj Vercel Cron route vim cron ua haujlwm hauv function yuav timeout |
| Tracing | OpenTelemetry xa rau collector, OTEL_EXPORTER_OTLP_ENDPOINT |
Yam uas target no ua tsis tau
Thaum pib, web tier xyuas cov no thiab tsis kam nrog npe txhua teeb meem es tsis tos email xub xa tsis tau:
- Tsis muaj SMTP. Vercel thaiv SMTP tawm. Teem
QUIRE_EMAIL_PROVIDER_CONFIGua HTTP provider (Postmark, SES, Mailgun, SendGrid lossis Resend). Tsis txaisQUIRE_SMTP_URL. - Tsis muaj local disk. Tsis txais
QUIRE_STORAGE_DRIVER=local. - Tsis muaj memory sib koom ntawm kev hu. Tsis txais
QUIRE_REALTIME_DRIVER=inprocess. Server-sent events txwv raws function timeout; client rov txuas siv cursor, ces tsis poob event, tiam sis tsis muaj presence. - Tenant database pinned muaj ciam kwv yees yim, vim txhua qhov ntxiv ib connection pool hauv environment uas sib koom pool tsis tau.
Deploy
- Tsim Vercel project ntawm repository nrog Root Directory
apps/web.apps/web/vercel.jsonteeb install/build command (NITRO_PRESET=vercel) thiab xa/sw.jstsis cache. - Teeb environment variables. Siv
docker/.env.example, tsawg kawg muaj:QUIRE_DEPLOY_TARGET=vercel,QUIRE_APP_ORIGIN,QUIRE_CONTENT_ORIGIN,QUIRE_PLATFORM_DOMAINS,QUIRE_SECRET_KEY,QUIRE_MASTER_KEY,DATABASE_URL(chaw pooler),QUIRE_REPORT_DATABASE_URL,QUIRE_AUDIT_DATABASE_URL,QUIRE_DATABASE_ID,QUIRE_EMAIL_PROVIDER_CONFIG,QUIRE_MAIL_FROM, storage settings thiabQUIRE_COLLAB_URLnrogQUIRE_COLLAB_SIGNING_KEYtaw rau companion collab service.QUIRE_REPORT_DATABASE_URLyuav tsum yog physical database tib lub uasDATABASE_URLtaw rau. Rau txhua database tso npe ntxiv, ntxiv nws tus kheejquire_reportconnection URL rau environment web thiab worker, ces tso npe nws lub npe environment uaenv:NAMEhauv platform console. Analytics kaw ruaj yog report URL ploj ntawm database ntawd. - Hauv companion host, khiav
docker/compose.yamlyam tsis muajwebservice, siv tibdocker/.env: Migrations khiav ntawm no ua ntej txhawb Vercel deployment txhua zaus.docker compose -f docker/compose.yaml up -d migrate init worker scheduler collab content - Deploy. Yog teeb tsa tsis kam, function log pib “The web tier did not start on vercel” thiab teev txhua setting uas yuav hloov.
Upgrade
Ua migration ntawm companion host ua ntej, ces txhawb Vercel deployment tshiab, ces hloov companion workers: qhov kev txiav txim hauv upgrade.md. Instant rollback ntawm Vercel thim code xwb thiab yeej nyab xeeb hauv tib release.