Next.js
The Next.js blueprint sets up the infrastructure to run your Next.js application on Brainpod and wires it to your GitHub repository. Every push to your main branch automatically builds and deploys your app. No Dockerfile required: Brainpod uses Railpack to detect your framework and build the image for you.
What Gets Deployed
The blueprint creates the following resources in your pod:
- 1 App: configured for Next.js on port 3000, with
NODE_ENVset toproduction - 1 Route: a public hostname under
*.route.brainpod.iowith automatic TLS
Next.js is stateless by default, so no disk is needed. If your app writes files to disk (e.g. for uploads), add a Disk resource and mount it to your app after deploying the blueprint.
Deploying the Blueprint
- Go to your pod in the Brainpod dashboard
- Navigate to Blueprints
- Select Next.js
- Give your deployment a name (e.g.
web): this prefixes all created resources - Click Deploy
The blueprint deploys with a placeholder image. Your app will not serve real content until you connect your GitHub repository.
Connecting Your GitHub Repository
Brainpod uses GitHub Actions and Railpack to build your app automatically on every push.
- Open the App resource created by the blueprint
- Go to the Image Source tab and select GitHub Auto-Deploy
- Select your GitHub repository and branch
- Click Connect: Brainpod opens a pull request in your repository that adds:
steiger.yml: the Railpack build configuration.github/workflows/deploy-to-brainpod.yml: the GitHub Actions workflow
- Merge the pull request
From this point on, every push to your configured branch triggers a build. Railpack detects your Next.js project automatically, builds a container image, pushes it to the Brainpod registry, and your app is redeployed with the new image.
Monitoring Builds
You can follow the progress of each build in the Builds section of your pod. Each build shows its status, logs, and the artifact it produced. When a build completes successfully, the app switches to the new image automatically.
Next Steps
- Custom domains: Point your own domain to your app
- Apps: Configure environment variables, scaling, and more
- Container Registry: Learn about how images are stored
- Blueprints: Browse other available blueprints