title: Problem with Docker Compose - FATAL: database "root" does not exist (PostgresSQL)
body: <p>I trying to create a Postgres Database with Docker Compose, but i'm not understanding why the PSQL client is telling me that a database called root doesn't exists. </p>
  
  <p>That's the docker-compose.yml </p>
  
  <pre><code>version: '3.3'
  
  services:
    postgres:
      container_name: postgres
      image: "library/postgres:latest"
      env_file:
        - .env # configure postgres
      volumes:
        - database-data:/var/lib/postgresql/data/ # persist data even if container shuts down
      environment:
        POSTGRES_PASSWORD: ${DB_PASSWORD}
        POSTGRES_USER: ${DB_USER}
        POSTGRES_DB: ${DB_DATABASE}
      ports:
        - "5432:5432"
      restart: unless-stopped
  
  volumes:
    database-data:
  </code></pre>
  
  <p>When i run <code>docker-compose exec postgres env</code> it gives the right variables </p>
  
  <pre><code>POSTGRES_PASSWORD=4544
  POSTGRES_USER=root
  POSTGRES_DB=xpack
  </code></pre>
  
  <p>And when i run <code>docker exec -it postgres /bin/bash</code> and <code>psql</code> it returns the following error: </p>
  
  <pre><code>root@0719bff80472:/# psql -U root
  psql: error: could not connect to server: FATAL:  database "root" does not exist
  </code></pre>
  
  <p>I don't if my database was created or not</p>