Skip to content

Coolify Deployment

This page summarizes the production deployment shape for Coolify. The full operational guide also exists in the repo root as DEPLOYMENT.md.

Production topology

Deploy this repository as three services plus external Supabase:

  1. web service from this repo
  2. API service from this repo
  3. docs site from this repo
  4. managed Supabase project

Coolify service split

ServiceSourceRuntime
webapps/webstatic Vite build
apiapps/apiNode.js
docspackages/docsstatic VitePress build
database/auth/realtimeexternalSupabase

Critical build commands

API

bash
pnpm install --frozen-lockfile
pnpm --filter @arabic-itsm/shared build && pnpm --filter @arabic-itsm/api build
pnpm --filter @arabic-itsm/api start

Web

bash
pnpm install --frozen-lockfile
pnpm --filter @arabic-itsm/shared build && pnpm --filter @arabic-itsm/web build

Publish directory:

text
apps/web/dist

Docs

bash
pnpm install --frozen-lockfile
pnpm --filter @arabic-itsm/docs build

Publish directory:

text
packages/docs/docs/.vitepress/dist

Critical environment variables

API

bash
SUPABASE_URL=
SUPABASE_SERVICE_ROLE_KEY=
CLASSIFIER_URL=https://marbert.mo-baz.com
CLASSIFIER_MODEL_ID=marbert_l2_best
API_PORT=3001
API_CORS_ORIGIN=https://<your-web-domain>

NODE_ENV=production should be runtime-only in Coolify, not build-time.

Web

bash
VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=
VITE_API_URL=https://<your-api-domain>

Important caveats

  • Do not deploy local Supabase tooling from this repo as your production database strategy.
  • Do not expose SUPABASE_SERVICE_ROLE_KEY to the web app.
  • Configure SPA fallback to index.html for frontend deep links.
  • The classifier is an external integration, not part of this repo's Coolify deployment.
  • If the classifier is unavailable, this helpdesk still runs and falls back to manual routing.
  • Build @arabic-itsm/shared before @arabic-itsm/api for the API service.
  • Build @arabic-itsm/shared before @arabic-itsm/web for the web service.
  • Do not keep NODE_ENV=production available at build time for the API service in Coolify.

Verification

  • API health endpoint responds
  • web login loads
  • docs site loads
  • Arabic ticket submission works
  • ticket routing is saved correctly when the classifier is reachable
  • manual fallback works when the classifier is unreachable
  • stats screens load

Built from the current monorepo implementation.