Skip to content

CleverCloud/frankenphp-kv-json-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Management App for FrankenPHP on Clever Cloud

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 resources

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

Add Redirection.io support (optional)

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>"

Deploy the application

Everything is now ready, just deploy the application and open it:

clever deploy
clever open

About

PHP app using FrankenPHP runtime and MateriaKV JSON commands on Clever Cloud

Topics

Resources

Stars

Watchers

Forks