Skip to main content
Use this guide when you want to deploy a Next.js app on Floo, the AI deployment platform for Dockerfile-based web apps.

1. Add a Dockerfile

FROM floo-base-node:22 AS deps
WORKDIR /app
COPY package*.json ./
RUN npm ci

FROM floo-base-node:22 AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build

FROM floo-base-node:22
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app ./
EXPOSE 3000
CMD ["npm", "start"]

2. Add Floo Config

[app]
name = "nextjs-demo"

[services.web]
type = "web"
path = "."
port = 3000
ingress = "public"
If you want the CLI to generate a starting config file first, run floo init nextjs-demo before replacing it with the final shape above.

3. Dry Run And Connect GitHub

floo auth login
floo deploy --dry-run --json
floo apps github connect owner/repo --app nextjs-demo

4. Watch The First Deploy

floo deploy watch --app nextjs-demo
floo apps status nextjs-demo

What You Get

  • a live URL for the Next.js app
  • GitHub-backed deploys for future pushes
  • a dry-run workflow for checking config before each rollout