diff --git a/tarot-lab/.dockerignore b/tarot-lab/.dockerignore new file mode 100644 index 0000000..f965521 --- /dev/null +++ b/tarot-lab/.dockerignore @@ -0,0 +1,5 @@ +__pycache__ +*.pyc +.pytest_cache +data/ +tests/ diff --git a/tarot-lab/Dockerfile b/tarot-lab/Dockerfile new file mode 100644 index 0000000..2e77614 --- /dev/null +++ b/tarot-lab/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.12-slim-bookworm +ENV PYTHONUNBUFFERED=1 + +WORKDIR /app + +COPY requirements.txt . +RUN pip install --no-cache-dir --timeout 600 --retries 5 -r requirements.txt + +COPY . . + +EXPOSE 8000 +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"] diff --git a/tarot-lab/app/__init__.py b/tarot-lab/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tarot-lab/pytest.ini b/tarot-lab/pytest.ini new file mode 100644 index 0000000..82bc8d1 --- /dev/null +++ b/tarot-lab/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +asyncio_mode = auto +pythonpath = . diff --git a/tarot-lab/requirements.txt b/tarot-lab/requirements.txt new file mode 100644 index 0000000..e02cd3d --- /dev/null +++ b/tarot-lab/requirements.txt @@ -0,0 +1,7 @@ +fastapi==0.115.6 +uvicorn[standard]==0.34.0 +httpx>=0.27 +pydantic>=2.9 +pytest>=8.0 +pytest-asyncio>=0.24 +respx>=0.21 diff --git a/tarot-lab/tests/__init__.py b/tarot-lab/tests/__init__.py new file mode 100644 index 0000000..e69de29