version: '3'

services:
  postgres:
    image: postgres:latest
  web:
    build: .
    command:
      - bash
      - -c
      - |
        python3 manage.py migrate --noinput
        python3 manage.py loaddata core/fixtures/testdata-groups.json
        gunicorn --bind 0.0.0.0:8000 grady.wsgi
    volumes:
      - .:/code
    ports:
      - "8000:8000"
    depends_on:
      - postgres
