Name: guestbook
Owner: Stark & Wayne
Description: guestbook
Created: 2015-05-02 16:50:43.0
Updated: 2015-10-08 19:01:35.0
Pushed: 2015-05-12 15:47:59.0
Homepage: null
Size: 11292
Language: CSS
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This application is used to gather email addresses for the drawing at the Stark & Wayne booth at CF Summit.
To instantiate the database, we use ElephantSQL to provision an instance of Postgres:
reate-service elephantsql turtle guestbook-pg
To deploy the application, issue the following commands:
ush guestbook -m 256M -d starkandwayne.com --no-start
s guestbook guestbook-pg
tart guestbook
Blog post links are randomly selected from the Postgres database. To populate this database, we simply connect using the psql client and add them. A sample of the queries is included under samples/sample_data.sql.
To get the database URI, use “cf env” and get it from the credentials under VCAP_SERVICES.
env guestbook
ing env variables for app guestbook in org starkandwayne / space development as jrbudnack@starkandwayne.com...
em-Provided:
CAP_SERVICES": {
"elephantsql": [
{
"credentials": {
"max_conns": "5",
"uri": "postgres://bcknjfbm:jkH9Torzv1W6xH-xXkAFzJXYe6fYM9Ck@babar.elephantsql.com/bcknjfbm"
},
"label": "elephantsql",
"name": "guestbook-pg",
"plan": "turtle",
"tags": [
"Data Stores",
"Cloud Databases",
"Developer Tools",
"Data Store",
"postgresql",
"relational",
"New Product"
]
}
]
}
user-defined env variables have been set
To populate the sample data, run the following command (URI will differ):
postgres://bcknjfbm:jkH9Torzv1W6xH-xXkAFzJXYe6fYM9Ck@babar.elephantsql.com/bcknjfbm -f samples/sample_data.sql