Add FastAPI admin/public API service, database setup, Docker deployment files, docs, and tests.
23 lines
483 B
Docker
23 lines
483 B
Docker
FROM python:3.12-slim AS runtime
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY alembic.ini .
|
|
COPY alembic ./alembic
|
|
COPY app ./app
|
|
COPY data ./data
|
|
|
|
EXPOSE 4000
|
|
|
|
CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-4000}"]
|