How to deploy Rails 5.1.2 and Yarn on Dokku
Here’s what you need to do to deploy Rails 5.1.2 on Dokku.
Define custom buildpacks
For both Yarn and Rails to be deployed, you’ll need to use two custom buildpacks for your repository, instead of the standard that Dokku selects on build time. Add these two lines to a (new) .buildpacks file in your repository and push to your Dokku deployment:
# contents of .buildpacks
Git push to your repository on your Dokku-enabled server and you’ll now see your app deploy as expected, including your assets managed via Yarn.