Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

docker compose multiple command

version: '3'

services:
  app:
    build:
      context: .
    command: >
      sh -c "python manage.py wait_for_db &&
             python manage.py migrate &&
             python manage.py runserver 0.0.0.0:8000"
Comment

docker-compose command multiple

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

docker-compose command multiple

    command: |
      sh -c "python manage.py wait_for_db &&
             python manage.py migrate &&
             python manage.py runserver 0.0.0.0:8000"
Comment

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
Comment

docker-compose command multiple

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

docker compose multiple command

---
version: "2"
services:
  test:
    image: alpine
    entrypoint: ["/bin/sh","-c"]
    command:
    - |
       echo a
       echo b
       echo c
Comment

docker-compose command multiple

    command: >
      sh -c "python manage.py wait_for_db &&
             python manage.py migrate &&
             python manage.py runserver 0.0.0.0:8000"
Comment

docker compose multiple command

command:
      - /bin/bash
      - -c
      - |
        var=$$(echo 'foo')
        echo $$var # prints foo
Comment

docker compose multiple command

#!/bin/bash
python manage.py migrate
exec "$@"
Comment

docker compose multiple command

version: '3'

services:
  mongo:
    container_name: mongo
    image: mongo:3.2.12
    ports:
      - "27017:27017"
    volumes:
      - ./fixtures:/fixtures
      - ./deploy:/deploy
      - ../.data/mongodb:/data/db
    command: sh /deploy/local/start_mongod.sh
Comment

PREVIOUS NEXT
Code Example
Shell :: install appx package windows 
Shell :: git Already up to date. 
Shell :: bash float operation 
Shell :: check and verify git version 
Shell :: tar.gz extract 
Shell :: reverse search command mac 
Shell :: public key show 
Shell :: download torrent magnet on linux 
Shell :: mac install sklearn 
Shell :: git clean fdx 
Shell :: how to get the ip of a website 
Shell :: git chnage to commit id 
Shell :: list all user ubuntu server 
Shell :: install python debian 
Shell :: Create Local Github Repo 
Shell :: command to check pip3 version on linux 
Shell :: stop npm server cmd 
Shell :: enable systemd service linux 
Shell :: git return to last commit 
Shell :: specific branch clone git 
Shell :: git clone specific branch only 
Shell :: npm http server 
Shell :: git set remote origin url 
Shell :: kubectl top pod 
Shell :: .desktop file ubuntu 
Shell :: find or locate pip (s) path 
Shell :: command not found: yarn 
Shell :: git delete all remote branches except master 
Shell :: webgl server apache 
Shell :: git user config 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =