The PHP platform is built to be able to manage multiple front-end and interpretors. You can manage them in your tsuru.yml configuration file.
php:
version: 5.6
frontend:
name: nginx
interpretor:
name: fpm
composer: true
Currently, php supported versions are:
The following frontends are currently supported:
apache: Apachenginx: NginxYou can chose between them by setting the php.frontend.name parameter:
php:
frontend:
name: apache
Each frontend supports options that can be set in the php.frontend.options parameters.
All these options are not required, and can be used the following way:
php:
frontend:
name: apache
options:
vhost_file: /path/to/vhost.conf
modules:
- rewrite
vhost_file: The relative path of your Apache virtual host configuration filemodules: An array of module names, such as rewrite for instancevhost_file: The relative path of your Nginx virtual host configuration fileThe following PHP interpretors are supported:
fpm: PHP-FPMhhvm: HipHop Virtual MachineYou can chose between them by setting the php.interpretor.name parameter:
php:
interpretor:
name: fpm
These interpretors can also have options configured in the php.interpretor.options parameter.
If you choose fpm interpretor, use extensions option to install php extensions instead of using requirements.apt
All these options are not required and can be used the following ways
php:
interpretor:
name: fpm54
options:
ini_file: /path/to/file.ini
extensions:
- php-mysql
fpm optionsini_file: The relative path of your php.ini file in your project, that will replace the default oneextensions: A list of php extensions you needhhvm optionsini_file: The relative path of your php.ini file in your project, that will replace the default oneIn addition to the frontend and interpretor options, there's an other one:
composer: A boolean that is by default to true. If the value is true, it'll run a composer install if there's a composer.json file at the root of your application.To keep the backward compatibility, there's also a apache-mod-php frontend that is in fact the Apache with modphp enabled, that remove the need of an interpretor.
That's currently the default configuration if no parameter is set along php version 5.6.
With the current implementation, it's quite easy to add another interpretor for instance.
Content type
Image
Digest
sha256:e9cf4cdba…
Size
160.5 MB
Last updated
9 months ago
docker pull tsuru/php