t pushMerge branch 'main' of gitlab.prodcontest.com:team-39/backend

This commit is contained in:
gitgernit
2025-11-23 14:41:15 +03:00
6 changed files with 24 additions and 4 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 953 KiB

+2
View File
@@ -36,6 +36,8 @@ COPY ./src ./src
RUN uv sync --frozen --no-dev --no-cache --group ml RUN uv sync --frozen --no-dev --no-cache --group ml
RUN uv add prometheus-fastapi-instrumentator
# Stage 4: Backend Runtime # Stage 4: Backend Runtime
FROM ${PY_IMAGE} AS runtime FROM ${PY_IMAGE} AS runtime
+14
View File
@@ -1,5 +1,19 @@
# Rekomenci fluon *(рэкоменси флюйон)* # Rekomenci fluon *(рэкоменси флюйон)*
## Креды
### Coolify (https://paas.hackaton.itqdev.xyz)
login: `expert@tbank.ru`
password: `#lt5aEEiab^JgBd
### Grafana (https://grafana.hackaton.itqdev.xyz)
login: `admin`
password: `rFZVf9pCELm9fWqJ724pLMgNrjyInel3`
### Cadvisor (https://cadvisor.hackaton.itqdev.xyz)
### Prometheus (https://prometheus.hackaton.itqdev.xyz)
## **Кейс — сколько ты зарабатываешь?** ## **Кейс — сколько ты зарабатываешь?**
## Для продактов ## Для продактов
+2 -1
View File
@@ -83,8 +83,9 @@ RFC определяет интерфейсы для API, операционны
## 7. Деплой и CI/CD ## 7. Деплой и CI/CD
- Локально: Docker Compose (just up/build) - Локально: Docker Compose (just up/build)
- Staging/Prod: Coolify - Staging/Prod: Coolify
- CI pipeline: lint → build images → full tests → push образ → deploy staging - CI pipeline: lint → build images → full tests → sast → тагирование → deploy staging
- Резервное копирование: pg_dump + object storage snapshot. - Резервное копирование: pg_dump + object storage snapshot.
- Логи и екзек в контейнер в кулифае, метрики в графане
## 8. Миграции данных и схем ## 8. Миграции данных и схем
- Использовать alembic для миграций схем PostgreSQL. - Использовать alembic для миграций схем PostgreSQL.
+2 -1
View File
@@ -12,7 +12,6 @@ dependencies = [
"levenshtein>=0.27.3", "levenshtein>=0.27.3",
"adaptix==3.0.0b11", "adaptix==3.0.0b11",
"markupsafe", "markupsafe",
"prometheus-fastapi-instrumentator>=7.1.0",
] ]
[dependency-groups] [dependency-groups]
@@ -26,10 +25,12 @@ backend = [
"aioboto3==15.5.0", "aioboto3==15.5.0",
"python-multipart>=0.0.20", "python-multipart>=0.0.20",
"pgvector>=0.4.1", "pgvector>=0.4.1",
"prometheus-fastapi-instrumentator>=7.1.0",
] ]
ml = [ ml = [
"sentence-transformers>=5.1.2", "sentence-transformers>=5.1.2",
"torch", "torch",
"prometheus-fastapi-instrumentator>=7.1.0",
] ]
types = [ types = [
"types-cachetools==6.2.0.20250827", "types-cachetools==6.2.0.20250827",
Generated
+4 -2
View File
@@ -2406,6 +2406,7 @@ dependencies = [
{ name = "fastapi" }, { name = "fastapi" },
{ name = "levenshtein" }, { name = "levenshtein" },
{ name = "markupsafe" }, { name = "markupsafe" },
{ name = "prometheus-fastapi-instrumentator" },
{ name = "pydantic", extra = ["email"] }, { name = "pydantic", extra = ["email"] },
{ name = "uuid-utils" }, { name = "uuid-utils" },
{ name = "uvicorn" }, { name = "uvicorn" },
@@ -2419,7 +2420,6 @@ backend = [
{ name = "firebase-admin" }, { name = "firebase-admin" },
{ name = "httpx" }, { name = "httpx" },
{ name = "pgvector" }, { name = "pgvector" },
{ name = "prometheus-fastapi-instrumentator" },
{ name = "psycopg", extra = ["binary"] }, { name = "psycopg", extra = ["binary"] },
{ name = "python-multipart" }, { name = "python-multipart" },
{ name = "sqlalchemy" }, { name = "sqlalchemy" },
@@ -2460,6 +2460,7 @@ migrations = [
{ name = "alembic" }, { name = "alembic" },
] ]
ml = [ ml = [
{ name = "prometheus-fastapi-instrumentator" },
{ name = "sentence-transformers" }, { name = "sentence-transformers" },
{ name = "torch", version = "2.2.2", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "(python_full_version < '3.13' and platform_machine == 'aarch64' and platform_python_implementation == 'CPython' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform == 'darwin')" }, { name = "torch", version = "2.2.2", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "(python_full_version < '3.13' and platform_machine == 'aarch64' and platform_python_implementation == 'CPython' and sys_platform == 'linux') or (python_full_version < '3.13' and sys_platform == 'darwin')" },
{ name = "torch", version = "2.2.2+cpu", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "(python_full_version >= '3.13' and sys_platform == 'darwin') or (python_full_version >= '3.13' and sys_platform == 'linux') or (platform_machine != 'aarch64' and sys_platform == 'linux') or (platform_python_implementation != 'CPython' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" }, { name = "torch", version = "2.2.2+cpu", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "(python_full_version >= '3.13' and sys_platform == 'darwin') or (python_full_version >= '3.13' and sys_platform == 'linux') or (platform_machine != 'aarch64' and sys_platform == 'linux') or (platform_python_implementation != 'CPython' and sys_platform == 'linux') or (sys_platform != 'darwin' and sys_platform != 'linux')" },
@@ -2481,6 +2482,7 @@ requires-dist = [
{ name = "fastapi", specifier = "==0.119.0" }, { name = "fastapi", specifier = "==0.119.0" },
{ name = "levenshtein", specifier = ">=0.27.3" }, { name = "levenshtein", specifier = ">=0.27.3" },
{ name = "markupsafe", git = "https://github.com/pallets/markupsafe?rev=3.0.2" }, { name = "markupsafe", git = "https://github.com/pallets/markupsafe?rev=3.0.2" },
{ name = "prometheus-fastapi-instrumentator", specifier = ">=7.1.0" },
{ name = "pydantic", extras = ["email"], specifier = ">=2.12.4" }, { name = "pydantic", extras = ["email"], specifier = ">=2.12.4" },
{ name = "uuid-utils", specifier = "==0.11.1" }, { name = "uuid-utils", specifier = "==0.11.1" },
{ name = "uvicorn", specifier = "==0.37.0" }, { name = "uvicorn", specifier = "==0.37.0" },
@@ -2494,7 +2496,6 @@ backend = [
{ name = "firebase-admin", specifier = ">=7.1.0" }, { name = "firebase-admin", specifier = ">=7.1.0" },
{ name = "httpx", specifier = "==0.28.1" }, { name = "httpx", specifier = "==0.28.1" },
{ name = "pgvector", specifier = ">=0.4.1" }, { name = "pgvector", specifier = ">=0.4.1" },
{ name = "prometheus-fastapi-instrumentator", specifier = ">=7.1.0" },
{ name = "psycopg", extras = ["binary"], specifier = ">=3.2.12" }, { name = "psycopg", extras = ["binary"], specifier = ">=3.2.12" },
{ name = "python-multipart", specifier = ">=0.0.20" }, { name = "python-multipart", specifier = ">=0.0.20" },
{ name = "sqlalchemy", specifier = "==2.0.44" }, { name = "sqlalchemy", specifier = "==2.0.44" },
@@ -2532,6 +2533,7 @@ linters = [
] ]
migrations = [{ name = "alembic", specifier = "==1.17.0" }] migrations = [{ name = "alembic", specifier = "==1.17.0" }]
ml = [ ml = [
{ name = "prometheus-fastapi-instrumentator", specifier = ">=7.1.0" },
{ name = "sentence-transformers", specifier = ">=5.1.2" }, { name = "sentence-transformers", specifier = ">=5.1.2" },
{ name = "torch", index = "https://download.pytorch.org/whl/cpu" }, { name = "torch", index = "https://download.pytorch.org/whl/cpu" },
] ]