Adding mongodb service
(Hmmm, now restart everything and it automagically works? Or add the mongodb url to the nodejs pod some how?)
This commit is contained in:
parent
c3d600a041
commit
53a510899a
1 changed files with 10 additions and 0 deletions
10
README.md
10
README.md
|
@ -87,6 +87,16 @@ If you're running OpenShift on a local machine, you can preview the new app by s
|
||||||
|
|
||||||
$ oc expose service/nodejs-ex --hostname=10.2.2.2
|
$ oc expose service/nodejs-ex --hostname=10.2.2.2
|
||||||
|
|
||||||
|
#### database
|
||||||
|
|
||||||
|
You may have noticed the "Page view count" reads "No database configured". Let's fix that by adding a MongoDB pod:
|
||||||
|
|
||||||
|
$ oc new-app -e \
|
||||||
|
$ MONGODB_USER=admin,MONGODB_DATABASE=mongo_db,MONGODB_PASSWORD=secret,MONGODB_ADMIN_PASSWORD=super-secret \
|
||||||
|
$ centos/mongodb-26-centos7
|
||||||
|
|
||||||
|
(Database work to be continued...)
|
||||||
|
|
||||||
#### enjoy
|
#### enjoy
|
||||||
|
|
||||||
This example will serve a welcome page and the current hit count as stored in a database to [http://10.2.2.2](http://10.2.2.2).
|
This example will serve a welcome page and the current hit count as stored in a database to [http://10.2.2.2](http://10.2.2.2).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue