Files
kjvstudy.org/Dockerfile
T
kennethreitz 10583fc472 Replace FastAPI CLI with uvicorn and improve SEO metadata
Updates Dockerfile to use uvicorn directly instead of FastAPI CLI.
Enhances HTML templates with comprehensive SEO metadata including
structured data, Open Graph tags, and KJV-specific keywords throughout
all page titles and descriptions.
2025-05-26 13:25:35 -04:00

38 lines
830 B
Docker

FROM python:3.13 AS builder
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy
WORKDIR /app
# Copy dependency files
COPY pyproject.toml uv.lock ./
# Install dependencies into the system
RUN uv sync --frozen --no-install-project --no-dev
FROM python:3.13-slim
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH="/app" \
PATH="/app/.venv/bin:$PATH"
WORKDIR /app
# Copy virtual environment from builder stage
COPY --from=builder /app/.venv /app/.venv
# Copy application code
COPY . .
# Run the application using uvicorn directly
CMD ["uvicorn", "kjvstudy_org.server:app", "--host", "0.0.0.0", "--port", "8000"]