Skip to content

Updated the Heroku deployment article #7155

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

Merged
merged 1 commit into from
Nov 22, 2016
Merged
Changes from all commits
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
22 changes: 6 additions & 16 deletions deployment/heroku.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,16 @@ below:
~~~~~~~~~~~~~~~~~~~~

By default, Heroku will launch an Apache web server together with PHP to serve
applications. However, two special circumstances apply to Symfony applications:

#. The document root is in the ``web/`` directory and not in the root directory
of the application;
#. The Composer ``bin-dir``, where vendor binaries (and thus Heroku's own boot
scripts) are placed, is ``bin/`` , and not the default ``vendor/bin``.

.. note::

Vendor binaries are usually installed to ``vendor/bin`` by Composer, but
sometimes (e.g. when running a Symfony Standard Edition project!), the
location will be different. If in doubt, you can always run
``composer config bin-dir`` to figure out the right location.
applications. However, a special circumstance apply to Symfony applications:
the document root is in the ``web/`` directory and not in the root directory
of the application.

Create a new file called ``Procfile`` (without any extension) at the root
directory of the application and add just the following content:

.. code-block:: text

web: bin/heroku-php-apache2 web/
web: vendor/bin/heroku-php-apache2 web/

.. note::

Expand All @@ -114,14 +104,14 @@ directory of the application and add just the following content:

.. code-block:: text

web: bin/heroku-php-nginx -C nginx_app.conf web/
web: vendor/bin/heroku-php-nginx -C nginx_app.conf web/

If you prefer working on the command console, execute the following commands to
create the ``Procfile`` file and to add it to the repository:

.. code-block:: terminal

$ echo "web: bin/heroku-php-apache2 web/" > Procfile
$ echo "web: vendor/bin/heroku-php-apache2 web/" > Procfile
$ git add .
$ git commit -m "Procfile for Apache and PHP"
[master 35075db] Procfile for Apache and PHP
Expand Down