Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Heroku instructions #6394

Merged
merged 3 commits into from
Apr 12, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions cookbook/deployment/heroku.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,20 +305,20 @@ This is also very useful to build assets on the production system, e.g. with Ass

With the next deploy, Heroku compiles your app using the Node.js buildpack and
your npm packages become installed. On the other hand, your ``composer.json`` is
now ignored. To compile your app with both buildpacks, Node.js *and* PHP, you can
use a special `multiple buildpack`_. To override buildpack auto-detection, you
now ignored. To compile your app with both buildpacks, Node.js *and* PHP, you need
use both buildpacks. To override buildpack auto-detection, you
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the multiple buildpack link should be removed at the bottom of the page too, as you don't use it anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] you need to use [...]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

need to explicitly set the buildpack URL:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should remove URL here, as you code snippet sets the buildpack by its alias, not by its URL


.. code-block:: bash

$ heroku buildpacks:set https://github.com/ddollar/heroku-buildpack-multi.git

Next, add a ``.buildpacks`` file to your project, listing the buildpacks you need:

.. code-block:: text

https://github.com/heroku/heroku-buildpack-nodejs.git
https://github.com/heroku/heroku-buildpack-php.git
$ heroku buildpacks:set heroku/nodejs
Buildpack set. Next release on your-application will use heroku/nodejs.
Run git push heroku master to create a new release using this buildpack.
$ heroku buildpacks:set heroku/php --index 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could just use heroku buildpacks:add

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered that, but in the end I thought this was better because this way is idempotent.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't buildpacks:add added for exactly this usage (please note that I don't know anything about heroku)? If it is, I think we should use it instead of the current situation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sort of is, but the problem is that build pack order matters. In order to be able to use a composer post-install hook for e.g. Gulp, the node build pack needs to come before the PHP build pack. Just using buildpacks:add makes the process depend on the state of the application. The process I describe is idempotent.

Buildpack set. Next release on your-application will use:
1. heroku/nodejs
2. heroku/php
Run git push heroku master to create a new release using these buildpacks.

With the next deploy, you can benefit from both buildpacks. This setup also enables
your Heroku environment to make use of node based automatic build tools like
Expand Down