yaml – Using Docker-Compose, how to execute multiple commands

command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"

Same example in multilines:

command: >
    bash -c "python manage.py migrate
    && python manage.py runserver 0.0.0.0:8000"

Or:

command: bash -c "
    python manage.py migrate
    && python manage.py runserver 0.0.0.0:8000
  "

 

Source: yaml – Using Docker-Compose, how to execute multiple commands – Stack Overflow

yaml – Using Docker-Compose, how to execute multiple commands was last modified: December 3rd, 2020 by Jovan Stosic

Leave a Reply