title: Connection string for postgresql in docker-compose.yml file
body: <p>I am running NetCore project with docker support. My docker-compose.override.yml:</p>
  
  <pre><code>version: '3.4'
  
  services:
    traefik:
      ports:
        - '80:80'
        - '443:443'
        - '8080:8080'
  
    myapi:
      environment:
        - 'ASPNETCORE_ENVIRONMENT=Development'
        - 'ConnectionStrings:DbConnection=postgresql://postgres'
        - 'Services:Authorization=http://10.0.75.1'
        - 'Authorization:Url=http://10.0.75.1'
  
    postgres:
      environment:
        POSTGRES_USER: "user"
        POSTGRES_PASSWORD: "pass"
        POSTGRES_DB: testdb
      ports:
        - 5432:5432
  
    pgadmin4:
      environment:
        - PGADMIN_DEFAULT_EMAIL=user@domain.com
        - PGADMIN_DEFAULT_PASSWORD=SuperSecret
      ports:
       - 19000:80
  </code></pre>
  
  <p>And docker-compose.yml:</p>
  
  <pre><code>version: '3.4'
  
  services:
    traefik:
      image: traefik
      command: --web --docker --docker.domain=docker --logLevel=DEBUG
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - /develop/traefik/acme:/etc/traefik/acme
  
    postgres:
      image: postgres
      labels: { "traefik.enable":"false" }
  
    myapi:
      image: myapi
      build:
        context: .
        dockerfile: MyApi/Dockerfile
      links:
        - postgres
      labels: { "traefik.backend":"myapi", "traefik.frontend.rule":"PathPrefixStrip:/" }
  
    pgadmin4:
      image: dpage/pgadmin4
      links:
        - postgres
  </code></pre>
  
  <p>I can't bind connection string from myapi service to postgres docker container. I have also tried with postgresql://postgres:postgres@db:5432, and  postgresql://, and just postgres, no luck. </p>
  
  <p>I am getting log:</p>
  
  <pre><code>System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.
  </code></pre>
  
  <p>So obviously i cannot reach the db server.</p>
  
  <p>My original connection string, when I run app locally, works great, in form:</p>
  
  <p>User ID = user;Password=pass;Server=localhost;Port=5432;Database=testdb;Integrated Security=true;Pooling=true</p>
  
  <p>Any ideas how to map my service with postgres in docker here?
  Thx!</p>