Railway-deployable Docker image for an Agent-Native Clips server.
The image scaffolds a standalone Clips instance at build time, installs its dependencies, and builds the Nitro server. The resulting runtime image ships only the self-contained .output directory.
Two-stage build:
- builder (
node:22-slim) — scaffolds the app with@agent-native/core create app --standalone --template clips, then runspnpm installandpnpm build. - runner (
node:22-slim) — copies the Nitro.outputand runs it as the unprivilegednodeuser.
docker build -t clips-server .Pin the template generator version with a build arg (defaults to latest):
docker build --build-arg CORE_VERSION=1.2.3 -t clips-server .docker run -p 3000:3000 clips-serverThe server starts via node .output/server/index.mjs.
| Variable | Default | Notes |
|---|---|---|
PORT |
3000 |
Nitro listen port. Railway injects this automatically. |
NITRO_HOST |
0.0.0.0 |
Bind address. |
NITRO_PORT |
— | Overrides PORT if set. |
NODE_ENV |
production |
Set in the runner stage. |
Railway builds the Dockerfile directly and routes traffic to the runtime $PORT. No extra configuration is required — the EXPOSE 3000 line is documentation only.