Backend: - Add PostgreSQL service to docker-compose with health checks - Add SQLAlchemy async models for all entities (Agency, User, Campaign, Proof, ProofVersion, FlaggedItem, ResolvedItem, ErrorItem) - Add Alembic migration framework with initial schema migration - Add repository layer for CRUD operations - Add REST API endpoints for campaigns, proofs, and audit items - Add file storage service for proof uploads - Update WebSocket handler to optionally persist analysis results Frontend: - Add apiService.ts for REST API communication - Update geminiService.ts to support database persistence options Deployment: - Update deploy.sh to handle database migrations (6-step process) - Update Dockerfile to include alembic configuration - Add PostgreSQL environment variables to .env templates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
33 lines
783 B
Docker
33 lines
783 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# Install curl for healthcheck
|
|
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy requirements first for layer caching
|
|
COPY backend/requirements.txt .
|
|
|
|
# Install dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY backend/app/ ./app/
|
|
|
|
# Copy alembic configuration for migrations
|
|
COPY backend/alembic.ini .
|
|
COPY backend/alembic/ ./alembic/
|
|
|
|
# Copy reference docs into the image
|
|
COPY reference_docs/ ./reference_docs/
|
|
|
|
# Set reference docs path for container
|
|
ENV REFERENCE_DOCS_PATH=/app/reference_docs
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|