add fix for admin
This commit is contained in:
parent
3b40a322df
commit
d839eb110b
31
telegram-application/admin.Dockerfile
Normal file
31
telegram-application/admin.Dockerfile
Normal file
@ -0,0 +1,31 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Устанавливаем зависимости для Poetry
|
||||
RUN pip install poetry
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
build-essential \
|
||||
gcc \
|
||||
libffi-dev \
|
||||
libssl-dev \
|
||||
python3-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Устанавливаем рабочую директорию
|
||||
WORKDIR /app
|
||||
ENV PYTHONPATH=/app
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
|
||||
# Копируем файлы Poetry (pyproject.toml и poetry.lock)
|
||||
COPY pyproject.toml poetry.lock ./
|
||||
|
||||
# Устанавливаем зависимости через Poetry
|
||||
RUN poetry install --no-root
|
||||
|
||||
# Копируем весь код приложения
|
||||
COPY . .
|
||||
|
||||
# Команда для запуска приложения
|
||||
CMD ["poetry", "run", "uvicorn", "src.core.admin.runner:app", "--host", "0.0.0.0", "--port", "8000"]
|
10
telegram-application/admin.docker-compose.yml
Normal file
10
telegram-application/admin.docker-compose.yml
Normal file
@ -0,0 +1,10 @@
|
||||
services:
|
||||
admin:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: admin.Dockerfile
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env_prod
|
||||
ports:
|
||||
- "8000:8000"
|
36
telegram-application/poetry.lock
generated
36
telegram-application/poetry.lock
generated
@ -270,6 +270,21 @@ files = [
|
||||
{file = "charset_normalizer-3.4.1.tar.gz", hash = "sha256:44251f18cd68a75b56585dd00dae26183e102cd5e0f9f1466e6df5da2ed64ea3"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "click"
|
||||
version = "8.1.8"
|
||||
description = "Composable command line interface toolkit"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"},
|
||||
{file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
colorama = {version = "*", markers = "platform_system == \"Windows\""}
|
||||
|
||||
[[package]]
|
||||
name = "colorama"
|
||||
version = "0.4.6"
|
||||
@ -1768,6 +1783,25 @@ h2 = ["h2 (>=4,<5)"]
|
||||
socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"]
|
||||
zstd = ["zstandard (>=0.18.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "uvicorn"
|
||||
version = "0.34.2"
|
||||
description = "The lightning-fast ASGI server."
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "uvicorn-0.34.2-py3-none-any.whl", hash = "sha256:deb49af569084536d269fe0a6d67e3754f104cf03aba7c11c40f01aadf33c403"},
|
||||
{file = "uvicorn-0.34.2.tar.gz", hash = "sha256:0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
click = ">=7.0"
|
||||
h11 = ">=0.8"
|
||||
|
||||
[package.extras]
|
||||
standard = ["colorama (>=0.4)", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"]
|
||||
|
||||
[[package]]
|
||||
name = "wtforms"
|
||||
version = "3.1.2"
|
||||
@ -1886,4 +1920,4 @@ propcache = ">=0.2.0"
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = ">=3.11, <4.0"
|
||||
content-hash = "9101f85abe4759f93dc0b09fa8e980c7a5cf4b7ad583fbd6b5fd7845aae985d0"
|
||||
content-hash = "cebf22706bd49da4de34ae307eccd698cd1195f96ae0dd92d7c1311abb3fe979"
|
||||
|
@ -21,7 +21,8 @@ dependencies = [
|
||||
"aio-pika (>=9.5.4,<10.0.0)",
|
||||
"pyrogram (>=2.0.106,<3.0.0)",
|
||||
"sqladmin (>=0.20.1,<0.21.0)",
|
||||
"fastapi (>=0.115.12,<0.116.0)"
|
||||
"fastapi (>=0.115.12,<0.116.0)",
|
||||
"uvicorn (>=0.34.2,<0.35.0)"
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user