Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

docker compose multiple command

version: '3.1'
services:
  db:
    image: postgres
  web:
    build: .
    command:
      - /bin/bash
      - -c
      - |
        python manage.py migrate
        python manage.py runserver 0.0.0.0:8000

    volumes:
      - .:/code
    ports:
      - "8000:8000"
    links:
      - db
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #docker #compose #multiple #command
ADD COMMENT
Topic
Name
4+2 =