Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/methodgrab/heroku-multipack-php-node
PHP / Nginx backend with Node.js frontend package management / build
https://github.com/methodgrab/heroku-multipack-php-node
boilerplate heroku heroku-buildpack
Last synced: 15 days ago
JSON representation
PHP / Nginx backend with Node.js frontend package management / build
- Host: GitHub
- URL: https://github.com/methodgrab/heroku-multipack-php-node
- Owner: MethodGrab
- Created: 2016-06-27T09:10:09.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-03T23:11:30.000Z (over 4 years ago)
- Last Synced: 2024-11-06T01:37:09.348Z (2 months ago)
- Topics: boilerplate, heroku, heroku-buildpack
- Language: CSS
- Size: 25.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Heroku Multipack PHP & Node.js
> An example multipack app that uses a PHP / Nginx backend with Node.js frontend package management / build.## Usage
```sh
# Clone this repo, or clone your own fork
git clone [email protected]: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 open
```Alternatively, you can deploy your own copy of the app using the web-based flow:
[![Deploy to Heroku](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy)
## What's Happening
1. The [Node.js buildpack](https://github.com/heroku/heroku-buildpack-nodejs) runs, installing the dependencies from `package.json`.
1. The [PHP buildpack](https://github.com/heroku/heroku-buildpack-php) runs, installing the dependencies from `composer.json`.
1. As part of the Composer install, it also runs the custom [`compile` script](https://devcenter.heroku.com/articles/php-support#custom-compile-step) from `composer.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.