summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/source/installation.rst30
1 files changed, 19 insertions, 11 deletions
diff --git a/doc/source/installation.rst b/doc/source/installation.rst
index fe6a7e3..c4cc355 100644
--- a/doc/source/installation.rst
+++ b/doc/source/installation.rst
@@ -76,12 +76,14 @@ solvable via:
76Heroku installation 76Heroku installation
77------------------- 77-------------------
78 78
79Heroku official `buildpack <https://github.com/heroku/heroku-buildpack-php/>`_ uses ``Composer`` to install all dependencies required by your PHP application. 79Heroku's official `buildpack <https://github.com/heroku/heroku-buildpack-php/>`_
80If you're using `manual installation <installation.html#manual-installation>`__ and `default rules <https://github.com/jvoisin/snuffleupagus/blob/master/config/default.rules>`__, you might crash the deployment and encounter the following error: 80uses ``Composer`` to install all dependencies required by your PHP application.
81Careful with the `default set of rules
82<https://github.com/jvoisin/snuffleupagus/blob/master/config/default.rules>`__,
83since it might block the composer deployment, leading to the following errors:
81 84
82:: 85::
83 86
84 app[api]: Release v666 created by user kulisu@github.com
85 heroku[web.1]: Starting process with command `vendor/bin/heroku-php-apache2 -F fpm_custom.conf public/` 87 heroku[web.1]: Starting process with command `vendor/bin/heroku-php-apache2 -F fpm_custom.conf public/`
86 heroku[web.1]: Stopping all processes with SIGTERM 88 heroku[web.1]: Stopping all processes with SIGTERM
87 app[web.1]: Stopping httpd... 89 app[web.1]: Stopping httpd...
@@ -97,11 +99,11 @@ If you're using `manual installation <installation.html#manual-installation>`__
97Requirements 99Requirements
98^^^^^^^^^^^^ 100^^^^^^^^^^^^
99 101
100According to the `document <https://devcenter.heroku.com/articles/php-support#custom-compile-step>`_ you can install custom PHP extensions during compilation. 102To install snuffleupagus on heroku, simply follow the `documentation <https://devcenter.heroku.com/articles/php-support#custom-compile-step>`_,
101All you need to do is updaing ``composer.json`` to install Snuffleupagus, and updating ``Procfile`` to load additional PHP-FPM configuration. 103and edit the ``composer.json`` file, as well as the ``Procfile`` to load the additional PHP-FPM configuration.
102 104
103Composer 105composer.json
104^^^^^^^^^^ 106"""""""""""""
105 107
106:: 108::
107 109
@@ -123,10 +125,12 @@ Composer
123 } 125 }
124 } 126 }
125 127
126This step will compile Snuffleupagus to shared library, install it to proper path and specify an empty configuration in ``sp.configuration_file`` to ensure all Heroku console scripts against restrictions. 128This configuration will compile Snuffleupagus to shared library, install it to the proper
129location and specify an empty configuration in ``sp.configuration_file`` to ensure
130that the ``composer`` deployment phase won't get killed by some rules.
127 131
128PHP-FPM 132PHP-FPM
129^^^^^^^^^^ 133"""""""
130 134
131:: 135::
132 136
@@ -134,7 +138,11 @@ PHP-FPM
134 php_admin_flag[sp.allow_broken_configuration] = off 138 php_admin_flag[sp.allow_broken_configuration] = off
135 php_admin_value[sp.configuration_file] = /app/default.rules 139 php_admin_value[sp.configuration_file] = /app/default.rules
136 140
137The final step is setting ``sp.configuration_file`` in an additional `PHP-FPM configuration <https://devcenter.heroku.com/articles/custom-php-settings#php-fpm-configuration-include>`_, and specifying it to load with Apache or Nginx. That's it. Now your PHP application is hardening by Snuffleupagus. 141The final step is to point ``sp.configuration_file`` to a rule set by setting
142the preference in an additional `PHP-FPM
143configuration <https://devcenter.heroku.com/articles/custom-php-settings#php-fpm-configuration-include>`_.
144
145You should now be running Snuffleupagus in PHP on heroku:
138 146
139:: 147::
140 148
@@ -146,4 +154,4 @@ The final step is setting ``sp.configuration_file`` in an additional `PHP-FPM co
146Upgrading 154Upgrading
147--------- 155---------
148 156
149Upgrading the Snuffleupagus is as simple as recompiling it (or using a binary), replacing the file and restarting your webserver. 157Upgrading Snuffleupagus is as simple as recompiling it (or using a binary), replacing the file and restarting your webserver.