version: '2'
services:
    db:
        image: postgres
        environment:
            - POSTGRES_DB=om
            - POSTGRES_USER=om
            - POSTGRES_PASSWORD=om
        ports:
            - "5433:5432"
    web:
        build:
            context: .
        depends_on:
            - db
        entrypoint: dockerize -wait tcp://db:5432
        command: sh docker/docker-command.sh
        volumes:
          - .:/app
        ports:
            - "8001:8000"
        links:
            - db

version: '2'
services:
    db:
      restart: always
      image: postgres
      environment:
          - POSTGRES_DB=om
          - POSTGRES_USER=om
          - POSTGRES_PASSWORD=om
      ports:
          - "5432:5432"

    web:
      restart: always
      build:
        context: .
      command: sh docker/docker-command.sh
      entrypoint: dockerize -wait tcp://db:5432
      volumes:
        - .:/app
      ports:
        - "8000:8000"
      links:
        - db:db

Add restart: always and use default ports (docker containers).
Add restart: always and use default ports (docker containers).
