title: How to use ENV Variables Declared on Google Cloud Run Dashboard in React
body: <p>I am deploying a create-react-app Service onto Google Cloud Run using a Dockerfile, but I want to move away from declaring env variables in a .env file, and instead, declare them on Google Cloud Run's Dashboard like so:</p>
  <p><img src="https://i.stack.imgur.com/jlx5r.png" alt="Dashboard Image" /></p>
  <p>However, when I call the env var using</p>
  <pre><code>console.log(&quot;REDIRECT&quot;, process.env.REACT_APP_REDIRECT_URI)
  </code></pre>
  <p>null is returned for any env variable I try to reference. Is there another step to access these variables that I am missing?</p>
  <p>Here is my Dockerfile:</p>
  <pre><code>FROM node:10-alpine as react-build
  WORKDIR /app
  COPY . ./
  RUN yarn
  RUN yarn build
  
  FROM nginx:alpine
  COPY nginx.conf /etc/nginx/conf.d/configfile.template
  ENV PORT 8080 
  ENV HOST 0.0.0.0
  RUN sh -c &quot;envsubst '\$PORT'  &lt; /etc/nginx/conf.d/configfile.template &gt;      /etc/nginx/conf.d/default.conf&quot;
  COPY --from=react-build /app/build /usr/share/nginx/html
  EXPOSE 8080
  CMD [&quot;nginx&quot;, &quot;-g&quot;, &quot;daemon off;&quot;]
  </code></pre>