now-php-extra
A Now 2.0 builder for complicated PHP projects which need extra extensions (than
the @now/php
builder) like gd
, pdo
or dom
and supports Composer.
How to use it
Create a .php
file:
Create a now.json
like:
After running now
, you'll get a URL like this: https://php-deployment-7z9gyzb8j.now.sh/
With Composer
Install Cowsayphp package via Composer:
$ composer require alrik11es/cowsayphp
Create a index.php
file:
Create a .nowignore
file:
vendor
Technical Details
Entrypoint
The entrypoint file must be a .php
source file.
Version
- PHP 7.1 which includes
php-cli
andphp-fpm
. - Composer 1.8.0 by default.
Default configuration
In the majority of cases you shouldn't need to override the config
properties.
Maximum Lambda Bundle Size
To help keep cold boot times low, the maximum output bundle size for a PHP lambda is, by default, 10mb
.
This limit is extendable up to 50mb
.
Disclaimer
Inspired by @php/now package.