fix docker build missing readme

This commit is contained in:
2025-05-30 20:00:49 +01:00
parent b6167dfc5e
commit 4dbb440a76
2 changed files with 12 additions and 28 deletions

View File

@@ -6,11 +6,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml .
COPY pyproject.toml readme.md ./
RUN pip install --no-cache-dir .
COPY . .
# Create non-root user for security
RUN addgroup --system --gid 1001 python && \
adduser --system --uid 1001 --gid 1001 appuser
COPY --chown=appuser:python . .
USER appuser
EXPOSE 8000

View File

@@ -5,39 +5,17 @@ FastAPI backend for the CodeTutor coding interview preparation application.
## Setup
```bash
# Install dependencies
pip install -e ".[dev]"
# Run migrations
alembic upgrade head
# Load content data
python scripts/load_data.py
# Start development server
uvicorn src.main:app --reload
```
## API Endpoints
## Development
- `GET /api/questions` - List questions with filters
- `GET /api/questions/{slug}` - Question detail
- `GET /api/categories` - List categories
- `GET /api/patterns` - List patterns
- `GET /api/patterns/{slug}` - Pattern detail
- `GET /api/stats` - Aggregate statistics
- `GET /api/health` - Health check
```bash
uvicorn src.main:app --reload
```
## Testing
```bash
pytest
```
## Code Quality
```bash
ruff check .
ruff format --check .
mypy src/
```