content_image/796571.jpg
<img src='content_image/796571.jpg'>

## 2.3.4.1. Specifying environment variables 

When generating applications from a template, source, or an image, you can use the -e|--env  argument to pass environment variables to the application container at run time: 

$ oc new-app openshift/postgresql-92-centos7 \ 

-e POSTGRESQL_USER=user \ -e POSTGRESQL_DATABASE=db \ -e POSTGRESQL_PASSWORD=password 

The variables can also be read from file using the --env-file  argument. The following is an example file called postgresql.env : 

POSTGRESQL_USER=user POSTGRESQL_DATABASE=db POSTGRESQL_PASSWORD=password 

Read the variables from the file: 

$ oc new-app openshift/postgresql-92-centos7 --env-file=postgresql.env 

Additionally, environment variables can be given on standard input by using --env-file=- : 

$ cat postgresql.env | oc new-app openshift/postgresql-92-centos7 --env-file=- 

