Tl;dr - follow this Gist to get RedwoodJS running on Heroku.
I’ve got a basic guide for running RedwoodJS on Heroku. Not sure how much of this is going to change over time as Redwood evolves, but the basic approach is something like this:
- Add a build script to the root package.json
- Have a
releasephase that runs
yarn rw db up
- Have a modified pm2 script that fires up the api-server using a UNIX Socket (because that’s what Heroku lets you work with when you want to run multiple backends from a single frontend Nginx server) and signals to Heroku’s NGINX buildpack that the app has started successfully
- Use the Heroku NGINX buildpack and point it at that unix socket, and the build
Feedback welcome here or on the Gist to keep it up to date!