

However the full list of options is in the docs should you need them. host: The subdomain name for this application.instances: The number of instances to initially start.Memory is expensive in cloud apps, so keep this as low as you can. memory: Memory limit for the application.I’ve picked the PHP buildpack that’s supplied with Bluemix. This can be a name from cf buildpacks or a GitHub URL. Every other option is used to override the defaults and I find it useful to ensure that I know what will be configured. Note that the app name may be used on the command line, so it’s easier if it doesn’t have a space in it. Your Cloud Foundry environment is controlled by the manifest file, manifest.yml which must be in the root directory of your application.Įvery CF app needs a name, and this is minimum requirement for a valid manifest file. I want to use PHP 7.1, need to add "php" : "7.1.*" to the require section of composer.json like this: To select the one that we will use, we use the standard Composer require statement. In our case, we’ll use the PHP buildpack which comes with a variety of PHP versions. Select PHP versionĬF uses buildpacks which control the environment. In my case, I’m deploying a Slim application, but practically, these steps work for any PHP app. There are a number of things we need to do to set up our PHP application for deployment. If you’re using the Bluemix CLI, just prefix all my commands with bx and you should be fine.įollow the relevant instructions for your operating system.

As I tend to prefer the Open Source option when I can, I used the cf tool.

Regardless, the same commands seem to work in both tools. If you have bx installed, then you can use bx cf to run Cloud Foundry commands. There’s a Cloud Foundry CLI and also there’s the Bluemix CLI tool too. I’m a command line person, so did it all via the command line. This turned out to be quite easy, but there are a number of steps involved, so I’m documenting it here. As I already have a Bluemix account, it seemed sensible to deploy it to their Application Runtimes service which is an installation of the Open Source Cloud Foundry project. I recently had a requirement to deploy a Slim application somewhere.
