title: Docker-Compose container ip address with container name
body: <p>My docker-compose have a two  service,
  and docker-compose.yml define enviroment variable  ip address with container name,</p>
  
  <pre><code> version: '2'
  
  services:
    api:
      build: ./api/
      command: python3 manage.py runserver
      volumes:
        - ./api:/code
      ports:
        - "8000:80"
      networks:
        - dock_net
      container_name: con_api
  
    web:
      build: ./web/
      command: python3 manage.py runserver
      volumes:
        - ./web:/code
      ports:
        - "8001:80"
      networks:
        - dock_net
      container_name: con_web
      environment:
          Ip:con_ip
  
  networks:
    dock_net:
        driver: bridge
  </code></pre>
  
  <p>But variable see "con_ip" not 127.0.0.3</p>