Deploy this task management application with FrankenPHP on Clever Cloud. It uses Materia KV with JSON commands and Predis client. To follow this tutorial, you need a Clever Cloud account and Clever Tools:
npm i -g clever-tools
clever login
You can also install Clever Tools with many packages managers.
Create and configure a FrankenPHP application with a linked MateriaKV add-on:
git clone https://github.com/CleverCloud/frankenphp-kv-json-example
cd frankenphp-kv-json-example
clever create -t frankenphp
clever env set CC_WEBROOT "/public"
clever addon create kv kvFrankenPHP --link frankenphp-kv-json-example
If you want to use Redirection.io in front of a FrankenPHP application, configure it as a proxy on Clever Cloud.
In the following example, FrankenPHP listens on port 4242
, Redirection.io's agent is enabled, listens on port 8080
and forward requests to the application. Don't forget to create a Redirection.io account and get a project key for a self-hosted instance.
clever env set CC_FRANKENPHP_PORT 4242
clever env set CC_ENABLE_REDIRECTIONIO true
clever env set CC_REDIRECTIONIO_FORWARD_PORT 4242
clever env set CC_REDIRECTIONIO_PROJECT_KEY "<your-redirectionio-project-key>"
Everything is now ready, just deploy the application and open it:
clever deploy
clever open