Prepare the App
Page last updated:
Page last updated:
In this step, you will prepare a simple application that can be deployed. Execute the following commands to clone the sample application:
$ git clone https://github.com/swisscom/cf-sample-app-php.git $ cd cf-sample-app-php
You now have a functioning git repository that contains a simple Lumen application as well as a composer.json file, which is used by PHP’s dependency manager Composer.
There are two important things to know about the above repository:
- Cloud Foundry configures the PHP buildpack with the
.bp-config/options.jsonfile. In the example app we use it to use the latest version of PHP, enable some PHP extensions and change the webdir to prevent any conflicts with the buildpack source. - We have to handle the composer vendor source directory differently for the PHP buildpack in
bootstrap/app.php.