version: '3'

services:
  postgres:
    image: postgres:9.5
  web:
    build: .
    command:
      - /bin/sh
      - -c
      - |
        python manage.py migrate --noinput
        gunicorn --bind 0.0.0.0:8000 grady.wsgi:application &
        cd static/ && python -m http.server 8080
    ports:
      - "8000:8000"
      - "8080:8080"
    depends_on:
      - postgres
