Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions docs/router/framework/react/how-to/deploy-to-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,57 @@ jobs:

---

## Dokploy Deployment

Choose Railpack in Build Type section and set `RAILPACK_START_CMD="bun run .output/server/index.mjs"` in Environment Settings tab.

Second way is to choose Dockerfile in Build Type then follow these steps:

### 1. Create `Dockerfile`

```dockerfile
# Use Bun base image
FROM oven/bun:1.3.2-alpine AS base
WORKDIR /app

# Install dependencies stage
FROM base AS deps
COPY package.json bun.lock ./
RUN bun install
Comment on lines +260 to +266
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

latest stable Bun Docker image version oven/bun 2025

💡 Result:

The latest stable oven/bun Docker image version released in 2025 is Bun 1.3.5 (released December 17, 2025). [1]

Use (stable release tags):

  • oven/bun:1.3.5 (exact)
  • oven/bun:1.3 / oven/bun:1 / oven/bun:latest (moving stable tags)
  • Variant example: oven/bun:1.3.5-debian [2]

Not stable: oven/bun:canary (nightly/bleeding-edge). [3]

Sources:
[1] https://bun.com/blog/bun-v1.3.5
[2] https://docker.aityp.com/image/docker.io/oven/bun%3A1.3.5-debian
[3] https://hub.docker.com/r/oven/bun


🌐 Web query:

TanStack Start Bun version requirements production deployment

💡 Result:

For production deployment of a TanStack Start app on Bun, the current official guidance boils down to:

  • React requirement (critical): Bun-specific deployment instructions currently only work with React 19 (i.e., react and react-dom >= 19.0.0). If you’re on React 18, use the Node.js deployment path instead. [1]
  • Bun version pinning (notably for Vercel): When deploying to Vercel with Bun, set a Bun runtime version such as "bunVersion": "1.x" (or configure Nitro/Vercel runtime as bun1.x). [2]
  • How production is typically run on Bun: Use Nitro output and start the built server with Bun (e.g. bun run .output/server/index.mjs), and you may need Nitro’s preset: "bun" depending on how you build/invoke Nitro. [1][2]

Sources: TanStack Start “Hosting” docs (React) [1] and Bun’s “Use TanStack Start with Bun” deployment guide [2].


🌐 Web query:

Dokploy Bun Docker compatibility requirements

💡 Result:

Dokploy doesn’t impose Bun-specific Docker constraints beyond “it must be a containerized app”: Dokploy can deploy apps via your own Dockerfile, Docker Compose, or auto-build (Nixpacks/Heroku buildpacks). (dokploy.com)

For Bun in Docker, the practical compatibility requirements are mainly about the base image libc/OS choice:

  • Recommended (most compatible): glibc images (e.g., FROM oven/bun:latest or Debian-based equivalents). glibc generally has broader compatibility with native dependencies than musl (Alpine). (docs.docker.com)
  • Alpine support (musl): Bun supports Alpine/musl builds (and oven/bun:alpine). This is fine for many apps, but musl can be less compatible (and sometimes slower) than glibc, especially when native addons/binaries are involved. (bun.com)
  • If you use native modules on Alpine: you may need extra build/runtime packages (common issue with things like bcrypt), or choose a glibc-based image instead. (hub.docker.com)

If you tell me (1) whether you deploy via Dockerfile vs Nixpacks, and (2) whether you depend on native modules (bcrypt, sharp, prisma engines, etc.), I can suggest the safest Bun base image and a minimal Dockerfile for Dokploy.

Citations:


🏁 Script executed:

cat -n docs/router/framework/react/how-to/deploy-to-production.md | head -300 | tail -50

Repository: TanStack/router

Length of output: 1521


Update Bun image to latest stable version 1.3.5 and consider glibc variant for better compatibility.

The pinned oven/bun:1.3.2-alpine is outdated; the latest stable version is 1.3.5 (released December 17, 2025). Additionally, the Alpine variant uses musl which has less compatibility with native dependencies compared to glibc-based images. Consider updating to oven/bun:1.3.5 or oven/bun:1.3.5-debian for broader compatibility, particularly if your TanStack Start app uses native modules like bcrypt, sharp, or Prisma engines.

🤖 Prompt for AI Agents
In `@docs/router/framework/react/how-to/deploy-to-production.md` around lines 260
- 266, Update the base image FROM line currently pinning oven/bun:1.3.2-alpine
to the latest stable 1.3.5 and consider using the glibc/debian variant for
better native-module compatibility; specifically change the Dockerfile's FROM
statements (the "FROM oven/bun:1.3.2-alpine AS base" and any subsequent base
references such as "FROM base AS deps") to use either "oven/bun:1.3.5" or
"oven/bun:1.3.5-debian" so the build uses the updated Bun release and, if needed
for bcrypt/sharp/Prisma, the glibc-compatible image.


# Build stage
FROM base AS builder
COPY --from=deps /app/node_modules ./node_modules
COPY . .

# Build the application
RUN bun run build

# Production stage
FROM base AS runner
WORKDIR /app

ENV NODE_ENV=production
ENV PORT=3000

# Copy built application
COPY --from=builder /app/.output ./.output
COPY --from=builder /app/package.json ./package.json

# Expose port
EXPOSE 3000

# Start the application
CMD ["bun", "run", ".output/server/index.mjs"]
```

### 2. Dokploy Project Config

In Dokploy Application, in the General Tab, select the provider for your codebase as usual then in Build Type section choose Dockerfile and set Docker File to `./Dockerfile`
and Docker Context Path to `.`

---

## Firebase Hosting

### 1. Create `firebase.json`
Expand Down