Skip to content

Commit 9d30467

Browse files
author
Michal Fojtik
committed
Merge pull request #16 from rhcarvalho/env-vars
Pass relevant ENV VARs to application container
2 parents 970919d + c0a4e7b commit 9d30467

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

openshift/templates/nodejs-mongodb.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@
159159
}
160160
],
161161
"env": [
162+
{
163+
"name": "DATABASE_SERVICE_NAME",
164+
"value": "${DATABASE_SERVICE_NAME}"
165+
},
162166
{
163167
"name": "MONGODB_USER",
164168
"value": "${MONGODB_USER}"

openshift/templates/nodejs.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,28 @@
157157
{
158158
"containerPort": 8080
159159
}
160+
],
161+
"env": [
162+
{
163+
"name": "DATABASE_SERVICE_NAME",
164+
"value": "${DATABASE_SERVICE_NAME}"
165+
},
166+
{
167+
"name": "MONGODB_USER",
168+
"value": "${MONGODB_USER}"
169+
},
170+
{
171+
"name": "MONGODB_PASSWORD",
172+
"value": "${MONGODB_PASSWORD}"
173+
},
174+
{
175+
"name": "MONGODB_DATABASE",
176+
"value": "${MONGODB_DATABASE}"
177+
},
178+
{
179+
"name": "MONGODB_ADMIN_PASSWORD",
180+
"value": "${MONGODB_ADMIN_PASSWORD}"
181+
}
160182
]
161183
}
162184
]

0 commit comments

Comments
 (0)