title: PostgreSQL with docker compose and sqlalchemy
body: <p>Hey im trying to create a postgresql db container, im running it using the command:</p>
  
  <pre><code>docker-compose up
  </code></pre>
  
  <p>on the following compose file:</p>
  
  <pre><code>version: '3.1'
  services:
  
    db:
      image: postgres
      restart: always
      environment:
        POSTGRES_USERNAME: admin
        POSTGRES_PASSWORD: admin
        POSTGRES_DB: default_db
      ports:
        - 54320:5432
  </code></pre>
  
  <p>However when I try to connect to it using the follwoing python code:</p>
  
  <pre><code>import sqlalchemy
  engine = sqlalchemy.create_engine('postgres://admin:admin@localhost:54320/default_db')
  engine.connect()
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL:  password authentication failed for user "admin"
  </code></pre>
  
  <p>Anyone knows why this happens?</p>