title: Writing Data to InfluxDB V2 via php-Client fails - 504 Gateway Timeout
body: <p>i'am running influxDB<strong>v2</strong> in a separate docker-container. now I try to write datas to the database via php client running in a separate (php-fpm) docker-container.
  The php container running well and execute the php code. also the influxes.</p>
  <p>now I try to write data into the influx.</p>
  <p>When I run the code if get an 504 Error after few seconds. I think my php code did not have access to the localhost:8086 of the influx container?
  so I tried to change the host to</p>
  <p>http://localhost:8086<br />
  http://influxdb:8086<br />
  <a href="http://0.0.0.0:8086" rel="nofollow noreferrer">http://0.0.0.0:8086</a><br />
  influx_net:8086<br />
  influx_net_influxdb:8086. # created network of docker container</p>
  <p><strong>Note</strong>: this php code was generated from influx themselves:
  Token, bucket and org was also created in influxDB</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  declare(strict_types=1);
  
  require_once &quot;config.php&quot;;
  require SITE_ROOT . '/composer/vendor/autoload.php';
  
  use InfluxDB2\Client as InfluxClient;
  use InfluxDB2\Model\WritePrecision as WritePrecision;
  use InfluxDB2\Point as Point;
  
  $token = 'some_token';
  $org = 'myOrg';
  $bucket = 'myBucket';
  
  $client = new InfluxClient([
      &quot;url&quot; =&gt; &quot;http://localhost:8086&quot;,
      &quot;token&quot; =&gt; $token,
  ]);
  
  $writeApi = $client-&gt;createWriteApi();
  
  $data = &quot;mem,host=host1 used_percent=23.43234543&quot;;
  
  $writeApi-&gt;write($data, WritePrecision::S, $bucket, $org);
  echo &quot;done&quot;;
  </code></pre>
  <p>and here are the yaml files of</p>
  <p><strong>influx</strong></p>
  <pre class="lang-yaml prettyprint-override"><code>version: '3.7'
  
  services:  
    influxdb:
      image: influxdb:latest
      container_name: influxdb
      networks:
        - influx_net
      ports:
        - &quot;8086:8086&quot;
      volumes:
        - ./vol/influxFol/data:/var/lib/influxdb2
        - ./vol/influxFol/conf:/etc/influxdb2
      environment:
        - env.influxdb     
      restart: always
      deploy:
        resources:
          limits:
            memory: 500M
  
  volumes:
      influxFol: {}
  
  networks:
    influx_net:
      driver: bridge
  </code></pre>
  <p><strong>php fpm yaml</strong></p>
  <pre class="lang-yaml prettyprint-override"><code>version: '3.7'
  
  services:
  
    phpfpm:
      image: ${PHP}
      networks:
        - app-tier
        - influxdb_influx_net
      volumes:
        - ./code:/app
  
    nginx:
      image: ${NGINX}
      depends_on:
        - phpfpm
      networks:
        - app-tier
      ports:
        - '80:8080'
        - '443:8443'
      volumes:
        - ./nginx/conf/myapp.conf:/opt/bitnami/nginx/conf/server_blocks/myapp.conf
  
  networks:
      app-tier:
          driver: bridge
      influxdb_influx_net:
          external: true
  </code></pre>