How to create docker-compose file for psql/django/python apps

I want to dockerize our python/django application which uses postgresql in backend, and it also authenticate with our AD using LDAP.

How can I write docker-compose file for below three things

  1. Postgresql service should run
  2. python /manage.py migrate --settings=xxxxx.settings.local
  3. python /manage.py runserver --settings=xxxxxx.settings.local