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:

  1. Cloud Foundry configures the PHP buildpack with the .bp-config/options.json file. 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.
  2. We have to handle the composer vendor source directory differently for the PHP buildpack in bootstrap/app.php.
I cloned the App source
View the source for this page in GitHub