version: '3'

services:

  postgres:
    image: postgres:13
    restart: always
    networks:
      - default
    ports:
      - 6543:5432

  grady:
    build: .
    command: >
        sh -c "sleep 2 &&
               ./manage.py migrate --noinput &&
               ./deploy.sh"
    depends_on:
      - postgres
    restart: always
    networks:
      - default
    expose:
      - "8000"
    ports:
      - "8000:8000"
