Skip to content

Commit

Permalink
[CE-404] Support dynamic config mongo in user-dashboard
Browse files Browse the repository at this point in the history
Read process env for mongo config in user dashboard.

Change-Id: I6161181375a9b0b9d316fa54df4935fafae6c63c
Signed-off-by: Haitao Yue <[email protected]>
  • Loading branch information
hightall committed Jul 2, 2018
1 parent 6b238b4 commit 06763ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ services:
- SMTP_PORT=$SMTP_PORT
- SMTP_AUTH_USERNAME=$SMTP_AUTH_USERNAME
- SMTP_AUTH_PASSWORD=$SMTP_AUTH_PASSWORD
- MONGO_HOST=dashboard_mongo
- MONGO_PORT=27017
- MONGO_DB=user_dashboard
- FROM_EMAIL=$FROM_EMAIL
- WEBROOT=$USER_DASHBOARD_WEBROOT
- FABRIC_CFG_PATH=/etc/hyperledger/fabric
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ services:
- SMTP_PORT=$SMTP_PORT
- SMTP_AUTH_USERNAME=$SMTP_AUTH_USERNAME
- SMTP_AUTH_PASSWORD=$SMTP_AUTH_PASSWORD
- MONGO_HOST=dashboard_mongo
- MONGO_PORT=27017
- MONGO_DB=user_dashboard
- FROM_EMAIL=$FROM_EMAIL
- WEBROOT=$USER_DASHBOARD_WEBROOT
- FABRIC_CFG_PATH=/etc/hyperledger/fabric
Expand Down
2 changes: 1 addition & 1 deletion user-dashboard/src/config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = appInfo => {
},
mongoose: {
client: {
url: 'mongodb://dashboard_mongo/user_dashboard',
url: `mongodb://${process.env.MONGO_HOST}:${process.env.MONGO_PORT}/${process.env.MONGO_DB}`,
options: {},
},
},
Expand Down

0 comments on commit 06763ee

Please sign in to comment.