Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen:
Using PostgreSQL with PHP in Cloud Foundry
Sep 06, 2017 @ 14:45:10

Rob Allen has continued his look at running a PHP application on Bluemix via Cloud Foundry with a new post showing how to use a PostgreSQL database on the platform.

Having successfully deployed a PHP application to Cloud Foundry, I needed a PostgreSQL database for persistent storage. I found Lorna Mitchell's Connecting PHP to MySQL on Bluemix helpful and this article expands on that information.

I want to create a cloud-based PostgreSQL database and connect it to Laravel's Eloquent in a Cloud Foundry application. This is how to do it.

He starts off by showing how to create the database instance on the Cloud Foundry platform via their command-line tool. Next he shows how to bind the database service to the application instance and get the credentials you'll need to connect from your application. Finally he moves over to the PHP side and shows how to configure Eloquent to connect to the database service using these credentials and make a sample query.

tagged: tutorial database postgresql cloudfoundry bluemix series

Link: https://akrabat.com/using-postgresql-with-php-in-cloud-foundry/

Rob Allen:
Deploying a PHP application to Cloud Foundry
Aug 30, 2017 @ 15:22:03

Rob Allen has a new post to his site today showing you how to deploy your PHP application to Cloud Foundry, an open source cloud platform that helps to automate deployment onto multiple cloud infrastructures.

I recently had a requirement to deploy a Slim application somewhere. 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.

This turned out to be quite easy, but there are a number of steps involved, so I'm documenting it here.

After installing some of the command line tools he then prepares the PHP application by selecting a version, creating a manifest file, setting up buildpack options and defining rewrite rules. He then walks you through the deployment steps required to push the code out to the Bluemix host via Cloud Foundry, including the commands needed to make it all work.

tagged: deployment application tutorial cloudfoundry bluemix command configuration

Link: https://akrabat.com/deploying-a-php-application-to-cloud-foundry/


Trending Topics: