Index of every page on this site: llms.txt
All skills
rivet-dev avatar

/rivet-deploy-image

@3b027b3 official
by Rivetrivet-dev/skills53 stars
14
Run it yourself

Deploy a Docker image to a Rivet Cloud cluster through the Rivet MCP server, or roll a cluster back to an earlier build. Use when asked to deploy, ship, release, or roll back an app on a Rivet cluster and a shell with Docker is available.

Use this Skill: https://skilld.dev/gh/rivet-dev/skills/rivet-deploy-image

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesrunner-image.md

≈508 tokens on demand. Your agent reads this file only when SKILL.md points to it.

The runner image

A cluster runs the app's Rivet Actors on its default runner pool, from a Docker image of the app. The image runs a RivetKit registry as a runner.

Registry

  • Configure the registry with setup({ startEngine: false, startServices: false, runtime: "native", use: { ... } }) and call registry.start().
  • Do not set envoy.poolName. The cluster sets RIVET_POOL to the runner pool's name.
  • Do not set RIVET_ENDPOINT, RIVET_TOKEN or RIVET_ENVOY_VERSION in the image. The cluster connects the runner to its engine and sets its version on every deploy, so the engine drains the old runners.

HTTP

  • registry.start() serves no HTTP. Start the app's own HTTP server on the port in the PORT environment variable, which is 8080. The pool's public URL forwards there, and without a listener it returns 521.
  • Serve the runner's metrics from a second HTTP server on 127.0.0.1 at the port in the RIVETKIT_METRICS_PORT environment variable, which is 9464. Answer GET /metrics with registry.routes.prometheusMetrics(). The cluster ships them with the runner's logs. Keep this server off the public one.
  • The pool's public URL serves the app's own HTTP server, not the Rivet API. Never use it as RIVET_ENDPOINT.

Dockerfile

Build for linux/amd64. The saved image tarball must be 5 GiB or smaller.

Use this shape. The rm -rf drops parts of RivetKit's install a runner never uses, which otherwise make the image several GB and the deploy slow.

FROM node:22-bookworm-slim
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev --no-audit --no-fund \
	&& rm -rf node_modules/@rivet-dev/agentos-* node_modules/@rivet-dev/agent-os-* node_modules/@agentos-software node_modules/@rivetkit/engine-cli-* \
	&& npm cache clean --force
COPY . .
ENV NODE_ENV=production
CMD ["node", "server.js"]

Run npm install once so package-lock.json exists. Adjust COPY and CMD to the app, and add a .dockerignore with node_modules, *.tar and .env*.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts26d3 checks · Risk SAFE
  • Gen Agent Trust Hub26d

    The skill facilitates Docker image deployment to Rivet Cloud using standard shell commands and vendor-specific APIs. It follows security best practices such as recommending the exclusion of environment files from image builds.

  • Socket28d

    No alerts

  • Snyk28d

    Risk: LOW · No issues

Signed by skilld at 3b027b3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
metadata
{
  "rivet-requires": "rivet.deploy.prepare rivet.deploy.rollout"
}

README badge

README badge for rivet-dev/skills/rivet-deploy-image