---
title: "Te wāhanga ipurangi i te Vercel"
description: "Whakatū te wāhanga ipurangi Quire i te Vercel me tētahi kai mahi tautoko."
image: "https://docs.quirelms.com/og.png"
---

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

# Te wāhanga ipurangi i te Vercel

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

Ko te hoahoa te `docs/architecture/23-ops.md` wāhanga 5. Ka mahi te wāhanga
ipurangi anake i te Vercel. Ka mahi ē atu mea i tētahi pūrere tautoko e
whakahaeretia ana e koe, ā, ehara ia i te kōwhiria.

## Te tū i tēnei whakaputanga <!--quire:status-in-this-release-->

Kua tū te whakarite (`apps/web/vercel.json`, te tūtohu `vercel` o te Nitro me ngā
tātaritanga tīmata). Ka hiahiatia e te Vercel te kohinga kōnae tohono
(`QUIRE_STORAGE_DRIVER=s3` rānei `azure`), tētahi kaiwhakarato tūturu e mahi ana
i waenga i ngā whakaturanga mahi (`QUIRE_REALTIME_DRIVER=sse` rānei
`centrifugo`) me tētahi kaiwhakarato īmēra HTTP. Me te kore ēnei, ka ārai te
wāhanga ipurangi te tīmata, ā, ka kīia i tana rārangi pūrongo ia tautuhinga
kāore.

## Ngā wāhanga <!--quire:the-pieces-->

| Wāhanga | I hea e mahi ana |
| --- | --- |
| `web` | Ngā Vercel Functions, te wā mahi Node: ngā whārangi, te REST, te MCP, te LTI, ngā webhook kua tukuhia |
| `worker`, `scheduler`, `collab`, `content` | Tētahi pūrere tautoko: te Fly, te Railway, te ECS, rānei tō ake pūrere Docker me te `docker/compose.yaml` |
| Postgres | O waho, i muri i tētahi pūtuki whakawhitinga: te Neon, te Supabase, rānei te RDS me te PgBouncer |
| Ngā kōnae | Te S3 rānei te R2. Kāore he papa mau |
| Ngā mahi i muri | Ka tukuhia ma te pg-boss i roto i te whakawhitinga o te tono, ka mahia e te kai mahi tautoko. Me te `QUIRE_QUEUE_DRIVER=vercel` i te kai mahi tautoko, ka haere ngā mahi māmā (ngā whakamōhiotanga me ngā tuku webhook kāore e whakarārangihia) ma te Vercel Queues (`VERCEL_QUEUE_REGION`, `VERCEL_QUEUE_TOKEN`), nō reira kāore e tono tukutahi ana te Postgres mō ēnei |
| Ngā mahi hōtaka | Te kaiwhakarite tautoko. Kāore he ara Vercel Cron, i te mea ka pā te tono tuku i tētahi whakamātau e mahi ana i roto i tētahi mahi waitoho |
| Te mātātai | OpenTelemetry ki tō kaiwhakohi, te `OTEL_EXPORTER_OTLP_ENDPOINT` |

## Te mea kāore e taea ana e tēnei wāhi <!--quire:what-this-target-cannot-do-->

Ka tātaritia e te wāhanga ipurangi ēnei i te wā tīmata, ā, ka āraihia, me te kī
ia raruraru, ehara i te mahi i te he i mua i te īmēra tuatahi kāore e tukuna:

- **Kāore he SMTP.** Ka ārai te Vercel i te SMTP whakawāhi. Tautuhia te
  `QUIRE_EMAIL_PROVIDER_CONFIG` ki tētahi kaiwhakarato HTTP (te Postmark, te
  SES, te Mailgun, te SendGrid rānei te Resend). Ka āraihia te
  `QUIRE_SMTP_URL`.
- **Kāore he papa ā-rohe.** Ka āraihia te `QUIRE_STORAGE_DRIVER=local`.
- **Kāore he mahi mātā i waenga i ngā karanga whakaturanga.** Ka āraihia te
  `QUIRE_REALTIME_DRIVER=inprocess`. Ka ārahitia ngā take tukuna e te pū ki te
  tono tuku o te mahi waitoho; ka hono anō te kaihoko me tētahi pūni, nō reira
  kāore e ngaro tētahi take, engari kāore e wātea te noho tūmatanui.
- **Ka ārahitia ngā pūtaka wāhanga pūmau ki te tokowaru tata**, i te mea he
  tētahi atu pūtuki hono ia tētahi i tētahi taiao kāore e taea te tohono i ngā
  pūtuki hono.

## Te whakaturanga <!--quire:deploying-->

1. Hangaia tētahi kaupapa Vercel mai i te pūtaka me te **Root Directory**
   `apps/web`. Ka tautuhi te `apps/web/vercel.json` ngā whakahau whakaturanga me
   te hanga (`NITRO_PRESET=vercel`), ā, ka tukua te `/sw.js` me te kore
   kohinga.
2. Tautuhia ngā tūhu taiao. Mai i te `docker/.env.example`, iti rawa:
   `QUIRE_DEPLOY_TARGET=vercel`, `QUIRE_APP_ORIGIN`, `QUIRE_CONTENT_ORIGIN`,
   `QUIRE_PLATFORM_DOMAINS`, `QUIRE_SECRET_KEY`, `QUIRE_MASTER_KEY`,
   `DATABASE_URL` (te wāhi o te pūtuki), `QUIRE_REPORT_DATABASE_URL`,
   `QUIRE_AUDIT_DATABASE_URL`, `QUIRE_DATABASE_ID`,
   `QUIRE_EMAIL_PROVIDER_CONFIG`, `QUIRE_MAIL_FROM`, ngā tautuhinga kohinga, me
   te `QUIRE_COLLAB_URL` me te `QUIRE_COLLAB_SIGNING_KEY` e tū ana ki te
   ratonga collab o te tautoko.
   Ko te `QUIRE_REPORT_DATABASE_URL` te mea o te pūtaka ā-tinana e kīia ana e te
   `DATABASE_URL`. Mō ia pūtaka rēhita tāpiritenga, tāiritia tōna ake
   `quire_report` wāhi hono ki ngā taiao web me te worker, kātia ka rēhitatia
   tana ingoa tūhu taiao ma te `env:NAME` i te papa whakahaere o te pū. Ka rahua
   te tatauranga mēnā kāore te URL pūrongo o tētahi pūtaka.
3. I te pūrere tautoko, whakatematema te `docker/compose.yaml` me te kore te
   ratonga `web`, me te tahi `docker/.env`:
   ```sh
   docker compose -f docker/compose.yaml up -d migrate init worker scheduler collab content
   ```
   Ka tū ngā whakawhiti i reira, i mua i te whakatū i tētahi whakaturanga
   Vercel.
4. Whakaturia. I tētahi whakarite kāore e tāria, ka tīmata te rārangi pūrongo o
   te mahi me te "The web tier did not start on vercel", ā, ka tuhia ia
   tautuhinga hurihia.

## Te whakahou <!--quire:upgrading-->

Whakawhiti tuatahi mai i te pūrere tautoko, kātia ka whakawhinga te
whakaturanga Vercel hou, kātia ka āwehia ngā kai mahi o te tautoko: te tātari i
te [upgrade.md](/mi/ops/upgrade/). He whakahoki kore tukunga te whakahoki Vercel, ā, he
haumaru ia ngā wā katoa i roto i tētahi whakaputanga.

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