File size: 1,239 Bytes
adcbb74 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# 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
|