services:
  web:
    build:
      context: .
    command: gunicorn moby_dick.wsgi:application --bind 0.0.0.0:8000
    volumes:
      - static_volume:/staticfiles
      - media_volume:/mediafiles
    ports:
      - "8000:8000"
    env_file:
      - .env

  nginx:
    build: ./nginx
    volumes:
      - static_volume:/staticfiles
      - media_volume:/mediafiles
    ports:
      - "80:80"
    depends_on:
      - web

volumes:
    static_volume:
    media_volume:
