Use POSTGRESQL_DATABASE env to connect postgresql
This commit is contained in:
parent
50b9e09715
commit
17d5e242aa
2 changed files with 3 additions and 3 deletions
|
@ -265,7 +265,7 @@
|
|||
"kind": "Template",
|
||||
"metadata": {
|
||||
"annotations": {
|
||||
"description": "This example shows how to create a simple nodejs application in openshift origin v3",
|
||||
"description": "This example shows how to create a simple nodejs application in openshift origin v3"
|
||||
},
|
||||
"name": "nodejs-helloworld-sample"
|
||||
},
|
||||
|
|
|
@ -3,9 +3,9 @@ var util = require('util');
|
|||
|
||||
var postgresql_user = process.env.POSTGRESQL_USER || process.env.postgresql_user || "user";
|
||||
var postgresql_pass = process.env.POSTGRESQL_PASSWORD || process.env.postgresql_password || "pass";
|
||||
var postgresql_ip = process.env.POSTGRESQL_IP || process.env.postgresql_ip || "localhost";
|
||||
var postgresql_ip = process.env.DATABASE_SERVICE_HOST || "localhost";
|
||||
var postgresql_port = process.env.POSTGRESQL_PORT || process.env.postgresql_port || 5432;
|
||||
var postgresql_db = process.env.POSTGRESQL_DATABASE || process.env.postgresql_database || "db";
|
||||
var postgresql_db = process.env.POSTGRESQL_DATABASE || process.env.postgresql_database || "root";
|
||||
|
||||
if (postgresql_user == null || postgresql_pass == null || postgresql_ip == null || postgresql_db == null){
|
||||
console.log("Please check you have set the postgresql user/pass/db in nodejs-example container");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue