Skip to main content

Deploy Payload stack

Both Ovok Payload apps deploy from the monorepo root of Actimi/ovok-payload (required for @ovok/contracts).

Railway services (sandbox)

Railway serviceAppHealth check
payload-ovokovok-cmsGET /api/_ovok/health
ovok-control-planecontrol planeGET /health
ovok-internalovok-coreGET /healthcheck

Dashboard settings (each ovok-payload service):

  • Root directory: . (repo root, not apps/ovok-cms)
  • Config file: apps/ovok-cms/railway.toml or apps/ovok-control-plane/railway.toml

Attach a dedicated Postgres plugin per service — do not share one database between CMS and control plane.

Shared secret

PAYLOAD_INTERNAL_API_KEY on payload-ovok must match OVOK_INTERNAL_API_KEY on ovok-control-plane and ovok-core (PAYLOAD_INTERNAL_API_KEY there too).

payload-ovok variables

VariableExample
DATABASE_URI${{ovok-cms-postgres.DATABASE_URL}}
PAYLOAD_SECRET32+ random chars
PAYLOAD_PUBLIC_SERVER_URLhttps://payload-ovok-production.up.railway.app
PAYLOAD_INTERNAL_API_KEYshared secret
OVOK_CORE_INTERNAL_URLhttp://ovok-internal.railway.internal:4000

Optional production media: S3_BUCKET, S3_*, CDN_URL, CDN_PURGE_API_TOKEN.

ovok-control-plane variables

VariableExample
CONTROL_PLANE_DATABASE_URL${{ovok-control-plane-db.DATABASE_URL}}
OVOK_INTERNAL_API_KEYsame shared secret
OVOK_CMS_URLhttp://payload-ovok.railway.internal:8080
PORT4001

ovok-internal (ovok-core) variables

VariableExample
PAYLOAD_CMS_URLhttp://payload-ovok.railway.internal:8080
PAYLOAD_CONTROL_PLANE_URLhttp://ovok-control-plane.railway.internal:4001
PAYLOAD_INTERNAL_API_KEYsame shared secret

Use private .railway.internal hostnames for service-to-service calls within the Railway project.

Startup

Both containers migrate on start:

  • payload-ovok: payload migrate → Next.js server
  • ovok-control-plane: drizzle-kit migrate → Hono server

Local Docker smoke test

# From ovok-payload repo root
docker build -f apps/ovok-cms/Dockerfile -t ovok-cms .
docker build -f apps/ovok-control-plane/Dockerfile -t ovok-control-plane .
docker compose up cms-postgres control-plane-postgres -d
docker compose --profile apps up --build

Next