docker compose exec compose

C++
docker compose exec <your service name> <execute this command># -c flag indicates to read from string. Combine with &&
command: >
    bash -c "python manage.py makemigrations
    && python manage.py migrate
    && python manage.py runserver 0.0.0.0:8000"

Source

Also in C++: