Skip to main content

Language Guides

These guides take you from a project on your laptop to a running app on Miren, one language at a time. Each one covers the same three things: how to set up the app, how to set environment variables, and whether you need a Dockerfile.

Let your agent do this

If you use an AI coding agent (Claude Code, Codex, Amp, and others), you don't have to follow these guides by hand. Install the Miren agent skills and ask your agent to "set up this app on Miren" — it reads your project, detects the stack, wires up environment variables, and deploys. These guides double as the reference your agent works from. See Agent Skills for setup.

Pick your language

GuideAuto-detected?You provide
PythonYesrequirements.txt / pyproject.toml / Pipfile / uv.lock
JavaScript (Node & Bun)Yespackage.json + a lockfile
GoYesgo.mod
RubyYesGemfile
RustYesCargo.toml
Java / JVMNoDockerfile.miren
PHPNoDockerfile.miren
.NET / C#NoDockerfile.miren
C++NoDockerfile.miren
CNoDockerfile.miren
DenoNoDockerfile.miren
ElixirNoDockerfile.miren
KotlinNoDockerfile.miren
SwiftNoDockerfile.miren
DartNoDockerfile.miren
ScalaNoDockerfile.miren
ClojureNoDockerfile.miren
ErlangNoDockerfile.miren
HaskellNoDockerfile.miren
F#NoDockerfile.miren
JuliaNoDockerfile.miren
RNoDockerfile.miren
LuaNoDockerfile.miren
PerlNoDockerfile.miren
OCamlNoDockerfile.miren
CrystalNoDockerfile.miren
NimNoDockerfile.miren
ZigNoDockerfile.miren
GleamNoDockerfile.miren
Objective-CNoDockerfile.miren
RakuNoDockerfile.miren
Common LispNoDockerfile.miren
JRubyNoDockerfile.miren
TruffleRubyNoDockerfile.miren
Klong (K)NoDockerfile.miren
COBOLNoDockerfile.miren
BashNoDockerfile.miren
Static sites & SPAsNoDockerfile.miren

Auto-detected vs. Dockerfile

Six stacks are auto-detected. Miren reads your project files, picks the build stack, and builds a container image for you — no Dockerfile required. You run miren init once and miren deploy, and Miren figures out the rest.

StackDetected fromDefault version
RubyGemfile3.2
Pythonrequirements.txt, Pipfile, pyproject.toml, or uv.lock3.11
Node.jspackage.json + package-lock.json/yarn.lock20
Bunpackage.json + bun.lock1
Gogo.modParsed from go.mod, else 1.23
RustCargo.toml1.83

Each guide covers that stack's detection rules, build process, and start command in full. Override any default version with [build] version in .miren/app.toml.

Every other language here — from Elixir and Gleam to Kotlin, Swift, Julia, and even COBOL — isn't auto-detected, so its guide shows you a Dockerfile.miren you can drop into your project. Miren builds from that Dockerfile instead of guessing. This is the same escape hatch available to every language when you need full control over the build.

Want native support?

Native builds cover the common stacks today (Python, Node, Bun, Go, Ruby, Rust). If you'd like Miren to detect and build another language first-class — no Dockerfile needed — tell us what to build next.

Using Dockerfile.miren

For applications that require custom build steps or don't fit the automatic detection, provide a Dockerfile.miren in your project root. Miren builds from it instead of guessing your stack.

When to use Dockerfile.miren

  • Your application requires custom system dependencies
  • You need a multi-stage build
  • You're using a language that isn't auto-detected
  • You need specific build-time configurations

Example

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
EXPOSE 3000
CMD ["node", "dist/index.js"]

Build priority

  1. build.dockerfile setting in app.toml (if specified)
  2. Dockerfile.miren in project root
  3. Automatic language detection

Build arguments

Miren passes the following build arguments to your Dockerfile.miren:

  • MIREN_VERSION — the app version this build is producing, the same identifier miren app versions lists and the same value injected as the MIREN_VERSION environment variable at runtime

As with any Docker build argument, declare it with ARG in the stage that uses it:

FROM alpine:3.19
ARG MIREN_VERSION
RUN echo "building $MIREN_VERSION"

Build arguments apply to Dockerfile.miren builds only — auto-detected stacks don't run a Dockerfile.

Custom Dockerfiles need an explicit service

Even with a Dockerfile.miren, you must define at least one service — a Procfile or a [services.web] block. Miren does not use the image's CMD/ENTRYPOINT as the start command; that fallback applies only to auto-detected stacks.

What every guide assumes

  • You've installed Miren and can reach a cluster. If not, start with Getting Started.
Bind to the injected port

Your web service must bind to 0.0.0.0 on the port in the PORT environment variable. Miren injects PORT at runtime and routes traffic to it — an app that hardcodes localhost or a fixed port won't receive traffic.

Next steps