title: NODE_ENV not getting passed from ECS Fargate to React Application
body: <p>I have a React application that was built using Create-React-App. I have set up a deployment pipeline using GitHub Actions so that when I commit to branch 'pre-production' it will trigger a Docker Build and then put the build to AWS.</p>
  
  <p><strong>Here is part of the GitHub Actions .yml:</strong></p>
  
  <pre><code>  - name: Build and push image to Amazon ECR
      id: build-image
      env:
        ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
        ECR_REPOSITORY: application
        IMAGE_TAG: latest
  
      run: |
        # Build a docker container and
        # push it to ECR so that it can
        # be deployed to ECS.
        docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
        docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
        echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
  </code></pre>
  
  <p>Then inside my ECS Service, I have my task running which points to this build, and inside that container, I pass in the environement variables, like below:</p>
  
  <p><a href="https://i.stack.imgur.com/p9QbQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p9QbQ.png" alt="enter image description here"></a></p>
  
  <p>I then console log out the NODE_ENV in the application which for some reason keeps saying <strong>production</strong> instead of <strong>development</strong>.</p>
  
  <pre><code>console.log(process.env.NODE_ENV);
  </code></pre>