- make
- aws sam cli & aws cli
- docker
- jq 1.6+ (required for base64 decoding)
- diffutils
- dos2unix
- nodejs 8.10+ & npm
...Work in Progress
-
Fork/clone this repository.
-
WIP Edit
src/layer-wp/composer.json
to add the required themes, plugins, and any other libraries. Then updatecomposer.lock
withmake update
.Or replace it entirely with your own composer project!
-
WIP Edit
wp-config.php
to suit. -
WIP Edit src/sam.yaml to change environment variables and parameters to suit your deployment. E.g. specify database host/user/pass/name
-
Test with
make test
to 'integration' test the function and API with a simple script that echos the request body as the response body. -
Test with
make int
to 'acceptance' test via AP with the same echo script. -
Test with
make acc
to 'acceptance' test via API with WordPress. -
Deploy with
make deploy
and then test withmake til
to 'test in live' via the real API gateway.
- CloudFormation template (src/sam.yaml) with SAM transform
-
lambda function, nodejs 8.10 (src/func-js)
handles lambda events and hands off to PHP CGI 1.1
-
lambda layer, PHP 7.3.4 runtime CLI & CGI (src/layer-php)
built based on img2lambda example
-
lambda layer, composer managed WordPress app (src/layer-wp)
built based on john bloch (what about roots.io?)
-
Packages:
- PHPUnit with wp-content/vendor/bin/phpunit