If you haven't already, create your Next.js app by following the procedure outlined in the Next.js docs.
To deploy a Next.js app to Dokku, you have to do two things:
app.json
{"scripts": {"dokku": {"predeploy": "npm run build"}}}
Procfile
web: npm start -- --port $PORT
That's it! :)
Hi, I’m Max! I'm a fullstack JavaScript developer living in Berlin.
When I’m not working on one of my personal projects, writing blog posts or making YouTube videos, I help my clients bring their ideas to life as a freelance web developer.
If you need help on a project, please reach out and let's work together.
To stay updated with new blog posts, follow me on Twitter or subscribe to my RSS feed.