services:
  redis:
    image: redis
    ports:
      - "6379:6379"
  app:
    container_name: app
    build: .
    command: uvicorn summary.main:app --host 0.0.0.0 --port 8000 --reload
    volumes:
      - .:/app
    ports:
      - "8000:8000"
    restart: always
    env_file:
      ".env"
    depends_on:
      - redis
  celery_worker:
    container_name: celery_worker
    build: .
    command: celery -A summary.core.celery_worker worker --pool=solo --loglevel=debug
    volumes:
      - .:/app
    depends_on:
      - redis
      - app
