Copyright (c) Forge Gaming Network 2015
Welcome to ForgeTSM, a Teamspeak 3 channel creator web-app based on PHP & ts3admin.class, developed using Cloud9 & deployable to Heroku. We intend to either use AngularJS or Bootstrap for the frontend, however thats all in the future right now we are focused on the backend.
By using this multipack-nodejs-php the Forge-TSM app can be quickly deployed to Heroku, wihich would otherwise be difficult as Forge-TSM is a PHP app which requires UI Bootstrap to be installed by Bower.
- Based on the heroku/heroku-buildpack-multi
- Combines the Node.js and PHP buildpacks, which allows using Node from inside the PHP buildpack's
bin/compile
. - Forge-TSM will use Bower in a Composer post-install-cmd to install UI Bootstrap.
Example: http://heroku-multipack-nodejs-php-ex.herokuapp.com/
- The file
.buildpacks
instructs the Multi Buildpack which buildpacks to run in sequence - The Node.js buildpack installs Bower using NPM (see
package.json
/npm-shrinkwrap.json
) - The Node.js buildpack makes its binaries available to the next buildpack in the chain
- The PHP buildpack runs and installs dependencies using Composer
- As part of the composer install step, the
post-install-cmd
scripts run - That executes
$(npm bin -q)/bower install
-bower install
would work too, asnode_modules/.bin
is on$PATH
on Heroku, but it would likely not work on local development environments, hence the more portable use of prefixing the result fromnpm bin -q
to retrieve said directory name. - Bower installs Bootstrap
- Done!