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 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 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: "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 :: tree command 
Shell :: installer lamp ubuntui 
Shell :: how install node 14 ubuntu 
Shell :: install simplejwt django 
Shell :: dart 
Shell :: upload folder with gitbash 
Shell :: wsl2 settings 
Shell :: git merge with message 
Shell :: conda install easydict 
Shell :: /gi regex 
Shell :: check if word at end of string regex bash 
Shell :: how to push existing project to github 
Shell :: The platform "win32" is incompatible with this module. 
Shell :: hostname change inux 
Shell :: how to generate ssh key 
Shell :: git pull if exist and clone 
Shell :: vscode Error: EACCES: permission denied 
Shell :: gitattributes 
Shell :: ruby install for mac 
Shell :: installer microsoft teams ubuntu 
Shell :: applescript run from cli 
Shell :: how to avoid nginx not found 404 error ubuntu react app 
Shell :: bash true if grep has output 
Shell :: activate virtual environment in ubuntu 
Shell :: git config --global http.sslverify "false" This command resolve my problem 
Shell :: pip install local directory 
Shell :: git bash terminal weird characters 
Shell :: aws cli upload folder to s3 
Shell :: powershell copy-item specify credentials 
Shell :: git branch from commit 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =