title: How to add variables from GitLab settings to docker-compose file for my container on the server?
body: <p>I am trying to set environment variables for the server in the docker composer file for the mail client of my Django application.
  Before I add variables in Gitlab CI/CD settings (Rep->settings->CI/CD->variables) and try to use it in my docker-compose file</p>
  
  <p>My docker-compose file: </p>
  
  <pre><code>version: '3'
  
  services:
    my-server:
      image: server:latest
      build: .
      entrypoint: ["./entry_point.sh"]
      container_name: my-server
      environment:
        - DEBUG=True
        - DB_HOST=db
        - SUPPORT_EMAIL=${SUPPORT_EMAIL}
        - EMAIL_HOST=${EMAIL_HOST}
        - EMAIL_PORT=${EMAIL_PORT}
        - EMAIL_HOST_USER=${EMAIL_HOST_USER}
        - EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
      volumes:
        - media:/home/app/my-project/media/
      ports:
        - "8000:8000"
      depends_on:
        - db
  
  </code></pre>
  
  <p>But where I check docker container vars I see next.</p>
  
  <pre><code>root@myserver:~# docker exec ce30fd7afa8e  bash -c 'printenv'
  EMAIL_HOST=
  HOSTNAME=hjf7a7578
  PYTHON_VERSION=3.7.5
  PWD=/home/app
  HOME=/root
  LANG=C.UTF-8
  PIPENV_SYSTEM=1
  EMAIL_HOST_USER=
  EMAIL_PORT=
  EMAIL_HOST_PASSWORD=
  DB_HOST=db
  SUPPORT_EMAIL=
  DEBUG=True
  _=/usr/bin/printenv
  
  </code></pre>
  
  <p>How can I fix this? 
  I'm trying this format:</p>
  
  <p><code>-SUPPORT_EMAIL:${SUPPORT_EMAIL}</code></p>
  
  <p>and just:</p>
  
  <p><code>-SUPPORT_EMAIL</code></p>
  
  <p>But in this case, I don’t even see the keys inside the container.</p>