nanochat/services/auth/Dockerfile
Manmohan Sharma 4b4aca642a
feat(auth): OAuth2 + JWT auth service with Alembic migrations (#5 #7)
- Alembic async migrations: users, conversations, messages, is_favorited
- FastAPI auth service: Google + GitHub OAuth, RS256 JWT, refresh cookie
- /auth/me, /auth/refresh, /auth/validate (service-to-service)
- rate limiting 10/min on OAuth routes, CORS locked to FRONTEND_URL

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 11:47:00 -07:00

39 lines
901 B
Docker

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_SYSTEM_PYTHON=1 \
UV_LINK_MODE=copy
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential curl \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir uv==0.4.30
WORKDIR /app
COPY pyproject.toml README.md /app/
RUN uv pip install --system --no-cache \
"fastapi>=0.117.1" \
"uvicorn[standard]>=0.36.0" \
"pydantic>=2.8.0" \
"pydantic-settings>=2.4.0" \
"sqlalchemy[asyncio]>=2.0.36" \
"asyncpg>=0.29.0" \
"alembic>=1.13.0" \
"authlib>=1.3.2" \
"httpx>=0.27.0" \
"itsdangerous>=2.2.0" \
"pyjwt>=2.9.0" \
"cryptography>=43.0.0" \
"slowapi>=0.1.9" \
"python-multipart>=0.0.9"
COPY src /app/src
EXPOSE 8001
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8001"]