# This file is for local development. # It uses "build: ." to create an image from your local source code. services: # Service 1: The Answer Generation FastAPI app answer_service: build: . container_name: answer_service command: ["uvicorn", "answer_generation:app", "--host", "0.0.0.0", "--port", "9000"] ports: - "9000:9000" env_file: - .env volumes: - .:/app environment: - PYTHONPATH=/app # Service 2: The Question Generation FastAPI app question_service: build: . container_name: question_service command: ["uvicorn", "question_generation:app", "--host", "0.0.0.0", "--port", "8000"] ports: - "8000:8000" env_file: - .env volumes: - .:/app environment: - PYTHONPATH=/app # Service 3: The Gradio UI app gradio_app: build: . container_name: gradio_app command: ["python", "app.py"] ports: - "7860:7860" env_file: - .env volumes: - .:/app depends_on: - answer_service - question_service environment: - PYTHONPATH=/app - ANSWER_SERVICE_URL=http://answer_service:9000 - QUESTION_SERVICE_URL=http://question_service:8000