run multiple commands docker compose code example

Example 1: docker-compose command multiple

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

Example 2: docker-compose command multiple

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

Example 3: multiple run dockerfile

RUN cd / && \
    git clone https://github.com/ && \
    cd /fileadmin/ && \
    bundle install && \
    rake db:migrate && \
    bundle exec rails runner "eval(File.read 'createTestUser.rb')" && \
    mkdir /pending && \
    mkdir /live && \
    chmod 777 /pending && \
    chmod 777 /live

Example 4: multiple run dockerfile

RUN cd /
    git clone https://github.com/
    cd /fileadmin/
    bundle install
    rake db:migrate
    bundle exec rails runner "eval(File.read 'createTestUser.rb')"
    mkdir /pending
    mkdir /live
    chmod 777 /pending
    chmod 777 /live