Docker-compose allow the user want to execute multiple commands at the time in a Docker-compose.yaml file. There are two ways to do this, either using sh or bash.

The below commands are used to execute the multiple commands at a time in a docker-compose.yml file.

Option 1: 

command: >
    bash -c "python migrate
    && python runserver"

Option 2: 

command: bash -c "
    python migrate
    && python runserver

so, you the docker-compose.yml file would be,

version: '3'
      context: .
    command: >
      bash -c "python migrate
      && python runserver"

python migrate - run any migrations
python runserver - start your application in docker container