Multiple databases in docker and docker-compose : <p>I have a project consisting of two main java apps that use eight postgres databases, so is there a way in docker-compose to build eight different databases so that each one has a different owner and password? Can I even do that in docker-compose?</p>

<p><strong>example</strong>:</p>

<pre><code>services:
    postgresql:
        build: db/.
        ports:
            - "5432:5432"
        environment:
          - POSTGRES_DB=database1
          - POSTGRES_USER=database1
          - POSTGRES_PASSWORD=database1
</code></pre>

<p>I know I can put all the .sql files in the docker-entrypoint-initdb.d and postgres will make them automatically, but how do I declare what .sql file goes in what database?</p>

<p>Tnx,
Tom</p>
