Skip to content

Commit 6fc67c8

Browse files
authored
Merge pull request #7378 from coreydaley/github_rails_108
Updates Ruby on Rails example to include setting required env var
2 parents 32d00f8 + 5537bc8 commit 6fc67c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dev_guide/dev_tutorials/ruby_on_rails.adoc

+6-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ $ oc get pods --watch
303303
To bring your application to {product-title}, you need to specify a repository in which your application lives, using once again the xref:../../dev_guide/application_lifecycle/new_app.adoc#dev-guide-new-app[`oc new-app`] command, in which you will need to specify database related xref:../../using_images/db_images/postgresql.adoc#postgresql-environment-variables[environment variables] we setup in the xref:creating-the-database-service[Creating the Database Service]:
304304

305305
----
306-
$ oc new-app path/to/source/code --name=rails-app -e POSTGRESQL_USER=username -e POSTGRESQL_PASSWORD=password -e POSTGRESQL_DATABASE=db_name
306+
$ oc new-app path/to/source/code --name=rails-app -e POSTGRESQL_USER=username -e POSTGRESQL_PASSWORD=password -e POSTGRESQL_DATABASE=db_name -e DATABASE_SERVICE_NAME=postgresql
307307
----
308308

309309
With this command, {product-title} fetches the source code, sets up the builder image, xref:../../dev_guide/builds/index.adoc#dev-guide-how-builds-work[builds] your application image, and deploys the newly created image together with the specified xref:../../using_images/db_images/postgresql.adoc#postgresql-environment-variables[environment variables]. The application is named `rails-app`.
@@ -329,7 +329,12 @@ env": [
329329
{
330330
"name": "POSTGRESQL_DATABASE",
331331
"value": "db_name"
332+
},
333+
{
334+
"name": "DATABASE_SERVICE_NAME",
335+
"value": "postgresql"
332336
}
337+
333338
],
334339
----
335340

0 commit comments

Comments
 (0)