Name: cf-ex-phpmyadmin
Owner: Cloud Foundry Sample Applications
Description: CloudFoundry PHP example application: phpmyadmin
Created: 2013-06-24 18:00:28.0
Updated: 2017-12-15 14:56:39.0
Pushed: 2017-03-14 13:55:19.0
Homepage: null
Size: 9216
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is an example application which can be run on CloudFoundry using the [PHP Build Pack].
This is an out-of-the-box implementation of PHPMyAdmin 4.2.2. It's an example how common PHP applications can easily be run on CloudFoundry.
Clone the app (i.e. this repo).
clone https://github.com/cloudfoundry-samples/cf-ex-phpmyadmin
f-ex-phpmyadmin
If you don't have one already, create a MySQL service. With Pivotal Web Services, the following command will create a free MySQL database through ClearDb.
reate-service cleardb spark mysql
Push it to CloudFoundry.
ush
Access your application URL in the browser. Login with the credentials for your service. If you need to find these, just run this command and look for the VCAP_SERVICES environment variable under the System Provided
section.
nv <app-name>
When you push the application here's what happens.
htdocs
directory. It then copies the rest of the files that we pushed and replaces the default PHPMyAdmin files with them. In this case, it's just the config.inc.php
file.These changes were made to prepare it to run on CloudFoundry:
config.inc.php
. This was done by reading the environment variable VCAP_SERVICES, which is populated by CloudFoundry and contains the connection information for our services, and configuring the host, port from it. See this link for the details.