Skip to content

A demo project about how to deploy a FrankenPHP based app with standalone binary on Clever Cloud

Notifications You must be signed in to change notification settings

davlgd/frankenphp-standalone-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FrankenPHP standalone demo on Clever Cloud

This is a simple demo of how to deploy FrankenPHP standalone binary to serve a PHP application running on Clever Cloud. You'll need a Clever Cloud account and Clever Tools.

Setup Clever Tools

npm i -g clever-tools
clever login

Init the project

git clone https://github.com/davlgd/frankenphp-standalone-demo
cd frankenphp-standalone-demo

Create the application and deploy on Clever Cloud

Here we use the Node.js runtime on Clever Cloud, as it doesn't include a default web server. CC_PRE_RUN_HOOK environment variable is used to download FrankenPHP binary (including Caddy). package.json contains the script to start the application with FrankenPHP php-server command.

clever create -t node
clever env import < .env
git add . && git commit -m "Initial commit"
clever deploy
clever open

You can now visit the website or send a request with ?json=ENCODED_JSON in the URL to /api.php to check if it's a valid JSON. This demo uses some new features of PHP 8.3.

About

A demo project about how to deploy a FrankenPHP based app with standalone binary on Clever Cloud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published