It can be solve by using bash -c command.
Here is how it can be done.
command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"
An example in which we are giving commands in multiple line in a docker-compose file:
command: >
bash -c "python manage.py migrate
&& python manage.py runserver 0.0.0.0:8000"
I hope it will resolve your query.