---
title: "Vercel પર વેબ સ્તર"
description: "Vercel પર Quire નું વેબ સ્તર અને તેની સાથેનો worker ચલાવો."
image: "https://docs.quirelms.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.quirelms.com/gu/llms.txt
> Use this file to discover all available pages before exploring further.

# Vercel પર વેબ સ્તર

<span id="the-web-tier-on-vercel"></span>

રચના `docs/architecture/23-ops.md` ના વિભાગ 5 માં છે. Vercel ફક્ત વેબ સ્તર
ચલાવે છે. બાકીની દરેક વસ્તુ તમે સંચાલિત કરો એવા સાથી host પર ચાલે છે, અને તે
વૈકલ્પિક નથી.

## આ રિલીઝની સ્થિતિ <!--quire:status-in-this-release-->

ગોઠવણી તૈયાર છે (`apps/web/vercel.json`, `vercel` Nitro preset અને startup
ચકાસણીઓ). Vercel ને shared file storage (`QUIRE_STORAGE_DRIVER=s3` અથવા `azure`),
function instances વચ્ચે કામ કરતો realtime driver (`QUIRE_REALTIME_DRIVER=sse` અથવા
`centrifugo`) અને HTTP email provider જોઈએ. તે વિના વેબ સ્તર શરૂ થવાનો ઇનકાર કરે છે
અને તેના log માં દરેક ગાયબ સેટિંગનું નામ હોય છે.

## ઘટકો <!--quire:the-pieces-->

| ઘટક | ક્યાં ચાલે છે |
| --- | --- |
| `web` | Vercel Functions, Bun runtime: pages, REST, MCP, LTI, મળેલા webhooks |
| `worker`, `scheduler`, `collab`, `content` | સાથી host: Fly, Railway, ECS અથવા `docker/compose.yaml` ધરાવતો તમારો Docker host |
| Postgres | બાહ્ય, transaction pooler પાછળ: Neon, Supabase અથવા PgBouncer સાથે RDS |
| Files | S3 અથવા R2. કાયમી disk નથી |
| Background jobs | વિનંતીના transaction ની અંદર pg-boss માં queue થાય છે અને સાથી worker ચલાવે છે. સાથી worker પર `QUIRE_QUEUE_DRIVER=vercel` હોય ત્યારે હળવી jobs (ક્રમ વિનાના notification અને webhook deliveries) Vercel Queues (`VERCEL_QUEUE_REGION`, `VERCEL_QUEUE_TOKEN`) મારફતે જાય છે, જેથી pooled Postgres ને તેમના માટે વારંવાર તપાસાતો નથી |
| Recurring jobs | સાથી scheduler. Vercel Cron route નથી, કારણ કે function ની અંદર કામ કરતો cron timeout થાય છે |
| Tracing | તમારા collector ને OpenTelemetry, `OTEL_EXPORTER_OTLP_ENDPOINT` મારફતે |

## આ target શું કરી શકતું નથી <!--quire:what-this-target-cannot-do-->

વેબ સ્તર શરૂ થાય ત્યારે આ તપાસે છે અને પછી પહેલો email ન મોકલાય ત્યાં સુધી નિષ્ફળ
રહેવાને બદલે, દરેક સમસ્યાનું નામ બતાવીને શરૂ થવાનો ઇનકાર કરે છે:

- **SMTP નથી.** Vercel બહાર જતા SMTP ને અવરોધે છે. `QUIRE_EMAIL_PROVIDER_CONFIG`
  ને HTTP provider (Postmark, SES, Mailgun, SendGrid અથવા Resend) પર સેટ કરો.
  `QUIRE_SMTP_URL` નકારાય છે.
- **સ્થાનિક disk નથી.** `QUIRE_STORAGE_DRIVER=local` નકારાય છે.
- **Invocations વચ્ચે વહેંચાયેલી memory નથી.** `QUIRE_REALTIME_DRIVER=inprocess`
  નકારાય છે. Server-sent events function timeout સુધી મર્યાદિત છે; client cursor
  વડે ફરી જોડાય છે, તેથી event ગુમાતું નથી, પણ presence ઉપલબ્ધ નથી.
- **નિશ્ચિત tenant databases મર્યાદિત છે** લગભગ આઠ સુધી, કારણ કે દરેક બીજો connection
  pool ઉમેરે છે, જ્યારે આ environment pools વહેંચી શકતું નથી.

## Deploy કરવું <!--quire:deploying-->

1. Repository માંથી Vercel project બનાવો અને **Root Directory** ને `apps/web`
   રાખો. `apps/web/vercel.json` install અને build commands (`NITRO_PRESET=vercel`)
   સેટ કરે છે અને `/sw.js` ને cache વિના આપે છે.
2. Environment variables સેટ કરો. `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 નું સરનામું), `QUIRE_REPORT_DATABASE_URL`,
   `QUIRE_AUDIT_DATABASE_URL`, `QUIRE_DATABASE_ID`,
   `QUIRE_EMAIL_PROVIDER_CONFIG`, `QUIRE_MAIL_FROM`, storage settings,
   તથા સાથીના collab service તરફ સંકેત કરતા `QUIRE_COLLAB_URL` અને
   `QUIRE_COLLAB_SIGNING_KEY`.
   `QUIRE_REPORT_DATABASE_URL`, `DATABASE_URL` દ્વારા નામ અપાયેલા ભૌતિક ડેટાબેઝનું
   હોવું જોઈએ. દરેક વધારાના નોંધાયેલા ડેટાબેઝ માટે web અને worker environments માં
   પોતાનું `quire_report` connection URL ઉમેરો, પછી platform console માં તેનું
   environment variable name `env:NAME` તરીકે નોંધો. તે ડેટાબેઝનું report URL ન હોય
   તો Analytics સુરક્ષિત રીતે કામ બંધ કરે છે.
3. સાથી host પર `docker/compose.yaml` ને `web` સેવા વિના, એ જ `docker/.env` સાથે ચલાવો:
   ```sh
   docker compose -f docker/compose.yaml up -d migrate init worker scheduler collab content
   ```
   દરેક Vercel deployment સક્રિય થાય તે પહેલાં ત્યાં migrations ચાલે છે.
4. Deploy કરો. ગોઠવણી નકારાય તો function log ની શરૂઆત "The web tier did not start
   on vercel" થી થાય છે અને બદલવાની દરેક setting યાદીબદ્ધ કરે છે.

## અપગ્રેડ <!--quire:upgrading-->

પહેલાં સાથી host પરથી migrate કરો, પછી Vercel નું નવું deployment સક્રિય કરો, પછી
સાથીના workers ને ક્રમે બદલો: [upgrade.md](/gu/ops/upgrade/) માં આપેલો ક્રમ. Vercel નું
instant rollback કોડ rollback છે અને એક રિલીઝની અંદર હંમેશાં સુરક્ષિત છે.

Source: https://docs.quirelms.com/gu/ops/vercel/index.mdx
