Name: cf-ex-phppgadmin
Owner: Cloud Foundry Sample Applications
Description: CloudFoundry PHP example application: phpPgAdmin
Created: 2015-04-07 13:30:09.0
Updated: 2017-09-21 12:44:33.0
Pushed: 2017-09-21 12:44:32.0
Homepage: null
Size: 6
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 Buildpack.
This is an out-of-the-box implementation of PHPPgAdmin. 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-phppgadmin
f-ex-phppgadmin
If you don't have one already, create a Postgres service. With Pivotal Web Services, the following command will create a free Postgres database through ElephantSQL.
reate-service elephantsql turtle pgsql
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 PHPPgAdmin 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.