title: gitlab variable is not accessible in the docker-compose.yml file
body: <p>I am trying to create a CI/CD pipeline using gitlab and now facing an issue with the gitlab variable. This is not accessible inside docker compose file.</p>
  <p>this is my gitlab ci yml file</p>
  <pre><code>step-production:
    stage: production
    before_script:
      - export APP_ENVIRONMENT=&quot;$PRODUCTION_APP_ENVIRONMENT&quot;
    only:
      - /^release.*$/
    tags:
      - release-tag
    script:
      - echo production env value is &quot;$PRODUCTION_APP_ENVIRONMENT&quot;
      - sudo curl -L &quot;https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)&quot; -o /usr/local/bin/docker-compose
      - sudo chmod +x /usr/local/bin/docker-compose
      - sudo docker-compose -f docker-compose.prod.yml build --no-cache
      - sudo docker-compose -f docker-compose.prod.yml up -d
    when: manual
  </code></pre>
  <p>and this is my docker compose file</p>
  <pre><code>version: &quot;3&quot;
  
  services:
      redis:
          image: redis:latest
      app:
          build:
              context: .
          environment:
              - APP_ENVIRONMENT=${PRODUCTION_APP_ENVIRONMENT}
          command: python manage.py runserver 0.0.0.0:8000
          volumes:
              - ./app:/app
          ports:
               - &quot;8000:8000&quot;
          restart: on-failure:5
          # network_mode: &quot;host&quot;
  </code></pre>
  <p>Can someone help me on how to access the gitlab variable inside docker compose file ? I have spend more than a day on the same issue</p>