title: postgres & docker compose: change service status to ready after additional initialization
body: <p>In my case, a postgres database works as the main django backend database. Additional postgres initialization is required. The problem is that status of <code>postgres</code> service becomes <code>ready</code> before additional database initialization. As a result, dependent django app starts running prior to database initialization.</p>
  
  <p>Is there any way to configure <code>postgres</code> service in a way that becomes <code>ready</code> after additional initialization?</p>
  
  <p><code>docker-compose.yml</code>:</p>
  
  <pre><code>version: "3.3"
  
  services:
    postgres:
      image: library/postgres:11
      volumes:
        - some_folder:/docker-entrypoint-initdb.d
  
    django_app:
      image: custom_django_image:latest
      volumes:
        - $PWD:/app
      ports:
        - 8000:8000
      depends_on:
        - postgres
  </code></pre>