web service on the Node runtime, with no Dockerfile needed.
Prerequisites
A Next.js app in a GitHub or GitLab repository, withnext build and next start working
locally.
Configure the app
Next.js binds to0.0.0.0 and reads PORT when told to. Set the start script:
package.json
Host header on server actions. Set allowedOrigins so slipway’s
hostname is accepted:
next.config.js
Add slipway.yaml
slipway.yaml
Deploy
Select New, choose your repository, keep the tracked branch, and deploy. The service’s Logs tab opens on the first build; when the status reacheshealthy the service header
shows the URL.
Pushes to the tracked branch redeploy automatically.
Add a database
slipway.yaml
${service.db.url} resolves at deploy time, so no connection string is committed. See
Databases.
Static export instead
If you useoutput: 'export', deploy it as a static site with no container and no compute
charge:
slipway.yaml
Next steps
Secrets
Keep API keys out of the repository.
Custom domains
Serve under your own zone.