Skip to main content

Documentation Index

Fetch the complete documentation index at: https://redop.useagents.site/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use Docker when you want to run Redop on your own infrastructure, on a container platform, or from a monorepo build pipeline.

Choose a Docker shape

ShapeUse whenRuntime shape
Single-project Dockerfileone Redop app in one packagebun run src/index.ts
Monorepo production imageworkspace-based repo and optimized production imagecompiled Bun binary in a minimal runtime image

Docker fit

ItemValue
Recommended transporthttp
Required env varsPORT for the container runtime
Build commanddocker build -t redop-app .
Run commanddocker run --rm -p 3000:3000 -e PORT=3000 redop-app
Generated filescreate-redop-app --deploy fly-io generates a starting Dockerfile

Example src/index.ts

Use a listener shape like this in either Docker setup:
import { Redop } from "@redopjs/redop";

new Redop({
  serverInfo: {
    name: "docker-redop",
    version: "0.1.0",
  },
})
  .tool("ping", {
    handler: () => ({ ok: true }),
  })
  .listen({
    port: Number(process.env.PORT ?? 3000),
    hostname: "0.0.0.0",
  });

Single-project Dockerfile

This is the simplest Docker path for a normal Redop project.
FROM oven/bun:1.3.11

WORKDIR /app

COPY package.json bun.lock* ./
RUN bun install

COPY . .

ENV NODE_ENV=production

EXPOSE 3000

CMD ["bun", "run", "src/index.ts"]
Use this when:
  • your Redop app lives in one project directory
  • you do not need a compiled binary
  • you want the clearest Docker setup

Monorepo production Dockerfile

Use this when your Redop app lives inside a workspace and you want a slimmer runtime image.
FROM oven/bun:1.3.11 AS build

WORKDIR /app

COPY package.json package.json
COPY bun.lock bun.lock
COPY apps/mcp-server/package.json ./apps/mcp-server/package.json
COPY packages/search/package.json ./packages/search/package.json
COPY packages/utils/package.json ./packages/utils/package.json
COPY packages/tsconfig/package.json ./packages/tsconfig/package.json

RUN bun install

COPY apps/mcp-server ./apps/mcp-server
COPY packages/search ./packages/search
COPY packages/utils ./packages/utils
COPY packages/tsconfig ./packages/tsconfig

ENV NODE_ENV=production

RUN bun build \
  --compile \
  --minify-whitespace \
  --minify-syntax \
  --target bun-linux-x64 \
  --outfile mcp-server \
  apps/mcp-server/src/index.ts

FROM gcr.io/distroless/base

WORKDIR /app

COPY --from=build /app/mcp-server mcp-server

ENV NODE_ENV=production

EXPOSE 3000

CMD ["./mcp-server"]
Replace the example workspace paths with the real paths from your monorepo.

Tradeoffs

ChoiceBenefitsTradeoffs
bun run src/index.tssimpler and easier to debuglarger runtime image
bun build --compilesmaller, cleaner runtime imagemore build setup and target-specific output

Listener expectations

No matter which Docker shape you use:
  • bind to 0.0.0.0
  • read PORT
  • expose /mcp
  • do not assume /mcp/health unless you enabled health

Local smoke test

Build the image:
docker build -t redop-app .
Run it:
docker run --rm -p 3000:3000 -e PORT=3000 redop-app
Verify it:
curl -X POST http://localhost:3000/mcp \
  -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"docker-check","version":"1.0.0"}}}'
What success looks like:
  • the container starts without crashing
  • the app listens on 0.0.0.0:3000 inside the container
  • /mcp returns a valid initialize response

Next