diff options
| author | jvoisin | 2020-07-06 20:00:07 +0200 |
|---|---|---|
| committer | jvoisin | 2020-07-06 20:00:07 +0200 |
| commit | bb3083ec64eb262418479fe3005fd679318e9ca4 (patch) | |
| tree | e26dc0f6e14dd63a332856204516e6152ce03dcd /doc | |
| parent | 4937c39e9f1dd2e6e1be3bf668dffd3935122838 (diff) | |
Improve a bit the previous commit
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/source/installation.rst | 30 |
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: | |||
| 76 | Heroku installation | 76 | Heroku installation |
| 77 | ------------------- | 77 | ------------------- |
| 78 | 78 | ||
| 79 | Heroku official `buildpack <https://github.com/heroku/heroku-buildpack-php/>`_ uses ``Composer`` to install all dependencies required by your PHP application. | 79 | Heroku's official `buildpack <https://github.com/heroku/heroku-buildpack-php/>`_ |
| 80 | If 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: | 80 | uses ``Composer`` to install all dependencies required by your PHP application. |
| 81 | Careful with the `default set of rules | ||
| 82 | <https://github.com/jvoisin/snuffleupagus/blob/master/config/default.rules>`__, | ||
| 83 | since 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>`__ | |||
| 97 | Requirements | 99 | Requirements |
| 98 | ^^^^^^^^^^^^ | 100 | ^^^^^^^^^^^^ |
| 99 | 101 | ||
| 100 | According to the `document <https://devcenter.heroku.com/articles/php-support#custom-compile-step>`_ you can install custom PHP extensions during compilation. | 102 | To install snuffleupagus on heroku, simply follow the `documentation <https://devcenter.heroku.com/articles/php-support#custom-compile-step>`_, |
| 101 | All you need to do is updaing ``composer.json`` to install Snuffleupagus, and updating ``Procfile`` to load additional PHP-FPM configuration. | 103 | and edit the ``composer.json`` file, as well as the ``Procfile`` to load the additional PHP-FPM configuration. |
| 102 | 104 | ||
| 103 | Composer | 105 | composer.json |
| 104 | ^^^^^^^^^^ | 106 | """"""""""""" |
| 105 | 107 | ||
| 106 | :: | 108 | :: |
| 107 | 109 | ||
| @@ -123,10 +125,12 @@ Composer | |||
| 123 | } | 125 | } |
| 124 | } | 126 | } |
| 125 | 127 | ||
| 126 | This 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. | 128 | This configuration will compile Snuffleupagus to shared library, install it to the proper |
| 129 | location and specify an empty configuration in ``sp.configuration_file`` to ensure | ||
| 130 | that the ``composer`` deployment phase won't get killed by some rules. | ||
| 127 | 131 | ||
| 128 | PHP-FPM | 132 | PHP-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 | ||
| 137 | The 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. | 141 | The final step is to point ``sp.configuration_file`` to a rule set by setting |
| 142 | the preference in an additional `PHP-FPM | ||
| 143 | configuration <https://devcenter.heroku.com/articles/custom-php-settings#php-fpm-configuration-include>`_. | ||
| 144 | |||
| 145 | You 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 | |||
| 146 | Upgrading | 154 | Upgrading |
| 147 | --------- | 155 | --------- |
| 148 | 156 | ||
| 149 | Upgrading the Snuffleupagus is as simple as recompiling it (or using a binary), replacing the file and restarting your webserver. | 157 | Upgrading Snuffleupagus is as simple as recompiling it (or using a binary), replacing the file and restarting your webserver. |
