Raypx

Deployment

Deploying Raypx to production with Docker or other platforms.

Raypx is built on TanStack Start with Nitro as the server engine. The production build generates a standalone server in .output/ that can run on any Bun host.

Production Build

bun run build

This command runs Vite in production mode and outputs a self-contained server to the .output/ directory. The entry point is:

.output/server/index.mjs

Running the Production Server

bun .output/server/index.mjs

The server binds to the host and port defined by environment variables:

VariableDefaultDescription
HOST0.0.0.0Bind address
PORT3001Listen port

For convenience, the start script in package.json uses dotenvx to load .env before starting the server:

bun run start

Health Check

Raypx exposes a health endpoint that checks database connectivity and storage availability:

curl http://localhost:3001/api/health

A successful response returns:

{
  "status": "ok",
  "locale": "en-US",
  "database": { "status": "ok", "latency": 12 },
  "storage": { "status": "ok", "latency": 1 }
}

Use this endpoint in your orchestration platform (Docker, Kubernetes, etc.) to verify the service is healthy.

Deployment Options

On this page