title: Http request two container each other with one nginx
body: <p>I can not use curl to communicate between curator and dispenser container.
  I want to access from curator container like curl <a href="http://dispenser.shadysmaoui.test" rel="nofollow noreferrer">http://dispenser.shadysmaoui.test</a>.
  these two container, I can request by http request from host normally.</p>
  <p>docker-compose.yml</p>
  <pre><code>version: '3'
  services:
  
    webserver:
      image: nginx:alpine
      restart: unless-stopped
      tty: true
      ports:
        - &quot;80:80&quot;
        - &quot;443:443&quot;
      volumes:
        - ./apps/curator/:/var/www/curator
        - ./apps/dispenser/:/var/www/dispenser
        - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
        - ./docker/nginx/sites/:/etc/nginx/conf.d/
        - ./docker/nginx/ssl/:/etc/ssl/
      networks:
        - app-network
  
    curator:
      build:
        context: apps/curator
        dockerfile: Dockerfile
      image: digitalocean.com/php
      restart: unless-stopped
      tty: true
      environment:
        SERVICE_NAME: curator
        SERVICE_TAGS: dev
      working_dir: /var/www/curator
      volumes:
        - ./apps/curator/:/var/www/curator
        - ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
      networks:
        - app-network
  
    dispenser:
      build:
        context: apps/dispenser
        dockerfile: Dockerfile
      image: digitalocean.com/php
      restart: unless-stopped
      tty: true
      environment:
        SERVICE_NAME: dispenser
        SERVICE_TAGS: dev
      working_dir: /var/www/dispenser
      volumes:
        - ./apps/dispenser/:/var/www/dispenser
        - ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
      networks:
        - app-network
  
  networks:
    app-network:
      driver: bridge
  
  volumes:
    dbdata:
      driver: local
  </code></pre>