- Basic provisioning
- NGINX Configuration for frameworks
silex
andsymfony2
- Reading configuration from
composer.json
- NGINX 1.2 or 1.3
- PHP 5.3 or 5.4
- PHP-FPM
This buildpack detects apps when the app has a composer.json
in the
app's root.
Configuration is done via a file named composer.json
in the app's
root.
A simple configuration could look like this:
{
"name": "my-app",
"require": {
"php": ">=5.4.0",
"silex/silex": "~1.0@dev"
},
"extra": {
"heroku": {
"document-root": "web",
"index-document": "index.php"
}
}
}
This configures an app with the document root set to the project's web
directory, and sets that all requests should go through web/index.php
which contains the application's front controller.
This buildpack supports configuration through directives placed in the heroku
key in the extra
object.
Default: Null
Use a framework preset for configuration. Some configuration keys cannot be overriden!
Available presets:
silex
(needsdocument-root
andindex-document
set)symfony2
Example:
"framework": "silex"
Document root relative to the app root. Defaults to the app root.
"document-root": "web"
Default: "index.php"
Index Document relative to the document root.
"index-document": "app.php"
Set PHP and NGINX versions.
To launch the app with PHP 5.3.23 and NGINX 1.3.14:
"engines": {
"php": "5.3.23",
"nginx": "1.3.14"
}
See also:
Default: []
Add directives to the php.ini
.
"php-config": [
"display_errors=off",
"short_open_tag=on"
]
Status: Not Implemented
Default: []
Run console commands on slug compilation.
"compile": [
"php app/console assetic:dump --env=prod --no-debug"
]