title: Docker database does not exist
body: <p>I am developing using docker in a Django project. For this project I need multiple PostgreSQL database live at the same time to work. So, I put in the env file all the current settings:</p>
  <pre><code>DB_ENGINE=&quot;django.db.backends.postgresql_psycopg2&quot;
  POSTGRES_USER=&quot;zwap_user_settings_db&quot;
  POSTGRES_DB=&quot;zwap_user_settings_db&quot;
  DB_HOST=&quot;zwap_user_settings_postgres&quot;
  DB_PORT=&quot;5432&quot;
  POSTGRES_PASSWORD=zwap_settings_postgres_db
  </code></pre>
  <p>And I created the docker-compose.yml file to create all the needed postgresql instance at once</p>
  <pre><code>version: '3.7'
  
  services:
  
    ...
        
    zwap_settings_postgres:
      container_name: zwap_user_settings_postgres
      image: postgres
      ports:
        - 6003:5432/tcp
      environment:
        - POSTGRES_USER=zwap_user_settings_db
        - POSTGRES_PASSWORD=zwap_settings_postgres_db
        - POSTGRES_DB=zwap_user_settings_db
      volumes:
        - zwap_settings_postgres:/var/lib/postgresql/data/
  
    ...
        
  volumes:
    ...
    zwap_settings_postgres:
  </code></pre>
  <p>So, I try to run the Django project and this error occurs:
  <code>django.db.utils.OperationalError: FATAL:  database &quot;zwap_user_settings_db&quot; does not exist</code>  and this error appears also in the docker terminal. But I don't understand where is the error. The code is the same everywhere. Maybe it is simply a silly thing that needs to be changes. IF someone knows how to fix, please help me. Thank you</p>