An example multipack app that uses a PHP / Nginx backend with Node.js frontend package management / build.
# Clone this repo, or clone your own fork
git clone git@github.com:methodgrab/heroku-multipack-php-node.git
cd heroku-multipack-php-node
# Create a new Heroku app
heroku create
# Add the buildpacks
heroku buildpacks:add heroku/nodejs
heroku buildpacks:add heroku/php
# Deploy
git push heroku master
heroku openAlternatively, you can deploy your own copy of the app using the web-based flow:
- The Node.js buildpack runs, installing the dependencies from
package.json. - The PHP buildpack runs, installing the dependencies from
composer.json. - As part of the Composer install, it also runs the custom
compilescript fromcomposer.json.
The Node.js binaries are still available at this point so we can then run the Node.js build while having access to any composer dependencies that might need to be re-organised as part of the build step.
