މައި ކޮންޓެންޓަށް ދާ

Vercel ގައި web tier

އެކުގައި ހިންގޭ worker އާއެކު Vercel ގައި ޤުއަރޭ web tier ހިންގާށެވެ.

Markdown ގޮތަށް ބަލާ

މިޒައިން docs/architecture/23-ops.md ގެ 5 ވަނަ ސެކްޝަނެވެ. Vercel އިން web tier އެކަނި ހިންގައެވެ. އެހެންކަންކަން ހިންގަނީ ތިބާ އިދާރާކުރާ companion host އަކުންނެވެ، އެއީ އޮޕްޝަނަލް ނޫނެވެ.

މި release ގެ ޙާލަތު

ކޮންފިގަރޭޝަން ހުރެއެވެ (apps/web/vercel.json، vercel Nitro preset އަދި startup checks). Vercel އަށް shared file storage (QUIRE_STORAGE_DRIVER=s3 ނުވަތަ azure)، function instance ތަކަކުން ހިންގޭ realtime driver (QUIRE_REALTIME_DRIVER=sse ނުވަތަ centrifugo) އަދި HTTP email provider ލާޒިމެވެ. މިތަކެއް ނެތްނަމަ web tier ހިންގާނެއް ނޫނެވެ، log ގައި ނެތް settings ކޮބައިކަން ނަންދެއެވެ.

ބައިތައް

ބައި ކޮންތާކު ހިންގާ
web Vercel Functions، Bun runtime: page، REST، MCP، LTI، ލިބުނު webhook
worker، scheduler، collab، content companion host: Fly، Railway، ECS، ނުވަތަ docker/compose.yaml އާއެކު ތިބާގެ Docker host
Postgres transaction pooler ފަހަތުން external: Neon، Supabase، ނުވަތަ PgBouncer އާއެކު RDS
Files S3 ނުވަތަ R2. ދެމިތިބޭ disk ނެތެވެ
Background jobs request transaction ގެ ތެރޭ pg-boss އިން enqueue ކޮށް، companion worker އިން ހިންގައެވެ. Companion worker ގައި QUIRE_QUEUE_DRIVER=vercel އޮންކުރިޔާ، ލުއި job (އަންއޯޑަރޑް notification އަދި webhook delivery) Vercel Queues (VERCEL_QUEUE_REGION، VERCEL_QUEUE_TOKEN) އިން ދާނެއެވެ؛ pooled Postgres އަށް poll ނުކުރާނެއެވެ
Recurring jobs companion scheduler. ފަޔުންގައި ވަރކް ކުރާ Vercel Cron route ނެތެވެ، އެއް function ގައި cron work ވަގުތު ނިމޭތީ
Tracing ތިބާގެ collector އަށް OpenTelemetry، OTEL_EXPORTER_OTLP_ENDPOINT

މި target އަކުން ނުކުރެވޭ ތަކެތި

ފުރަތަމަ ހިންގާއިރު މިތަކެއްޗެއް ޗެކް ކޮށް ބުނެ، ފަހުން email ނުފޮނުވުމުން ފޭލް ނުކުރެއެވެ:

  • SMTP ނެތެވެ. Vercel އިން outbound SMTP ބްލޮކްކުރެއެވެ. QUIRE_EMAIL_PROVIDER_CONFIG އިން HTTP provider (Postmark، SES، Mailgun، SendGrid ނުވަތަ Resend) އަށް ސެޓްކުރާށެވެ. QUIRE_SMTP_URL މަނާ ކުރެވެއެވެ.
  • Local disk ނެތެވެ. QUIRE_STORAGE_DRIVER=local މަނާވެއެވެ.
  • Invocation ތަކާ ދެމެދު shared memory ނެތެވެ. QUIRE_REALTIME_DRIVER=inprocess މަނާވެއެވެ. Server-sent event ތައް function timeout އަށް ހަމަވެ؛ client އެއް cursor އާއެކު reconnect ކުރާތީ event އެއްވެސް ނުގެއްލޭނެއެވެ، އެކަމަކު presence ނުލިބޭނެއެވެ.
  • Pinned tenant database އަކަށް ލިމިޓްވެއެވެ؛ އެންމެ އަގުވީ 8 ގެ ކައިރި، ކޮންމެ އެއް database އަކީ pool އެއް އިތުރު ކުރުމެވެ؛ pool ތައް share ނުކުރެވޭ އިންވައިރަންމަންޓެއްގައި.

Deploy ކުރުން

  1. Repository އިން Vercel project އެއް ހަދާ، Root Directory apps/web ކަމަށް. apps/web/vercel.json އިން install އަދި build command ސެޓްކުރެއެވެ (NITRO_PRESET=vercel)، /sw.js ކެޝް ނުކޮށް ދެއެވެ.
  2. Environment variable ތައް ސެޓްކުރާށެވެ. docker/.env.example އިން އަދި ކޮނޑުން ލާޒިމް: QUIRE_DEPLOY_TARGET=vercel، QUIRE_APP_ORIGIN، QUIRE_CONTENT_ORIGIN، QUIRE_PLATFORM_DOMAINS، QUIRE_SECRET_KEY، QUIRE_MASTER_KEY، DATABASE_URL (pooler address)، QUIRE_REPORT_DATABASE_URL، QUIRE_AUDIT_DATABASE_URL، QUIRE_DATABASE_ID، QUIRE_EMAIL_PROVIDER_CONFIG، QUIRE_MAIL_FROM، storage settings، އަދި companion ގެ collab service އަށް ދާ QUIRE_COLLAB_URL އަދި QUIRE_COLLAB_SIGNING_KEY. QUIRE_REPORT_DATABASE_URL އަކީ DATABASE_URL އިން ނަންދޭ physical database އަށެވެ. އިތުރު database ރަޖިސްޓަރ ކުރިއްޔާ އޭގެ quire_report connection URL އެދެ web އަދި worker environment ތަކަށް އިތުރުކޮށް، platform console ގައި variable name env:NAME ގޮތަށް register ކުރާށެވެ. ޑޭޓާބޭސްގެ report URL ނެތްނަމަ analytics އެކަނި ފޭލް-ކްލޯޒް ވާނެއެވެ.
  3. Companion host ގައި docker/compose.yaml އިން web service ނެތި އެއް docker/.env އާއެކު ހިންގާށެވެ:
    docker compose -f docker/compose.yaml up -d migrate init worker scheduler collab content
    ކޮންމެ Vercel deployment އެއް promote ކުރާ ކުރިން އެތާ migrations ހިންގާނެއެވެ.
  4. Deploy ކުރާށެވެ. ކޮންފިގަރޭޝަން ރިޖެކްޓްވިއްޔާ function log އިން “The web tier did not start on vercel” އިން ފެށި ބަދަލުކުރަންޖެހޭ ސެޓިންގްތައް ލިސްޓްކުރެއެވެ.

Upgrade ކުރުން

ފުރަތަމަ companion host އިން migrate ކޮށް، ދެން އާ Vercel deployment promote ކޮށް، ފަހުން companion workers އަލުން roll ކުރާށެވެ: upgrade.md ގައިވާ order. Vercel instant rollback އަކީ code rollback އެކެވެ، release އެއްގެ ތެރޭގައި ހުރިހާއިރަކުވެސް ސޭފްވެއެވެ.

ނެވިގޭޝަން

ހޯދުމަށް ލިޔޭ…

↑↓ ބަދަލުކުރޭ↵ ނަންގާEsc ބަންދުކުރޭ