From 09dfe46a5bb74384dcc608f30fcaf009f3b724ee Mon Sep 17 00:00:00 2001 From: Arxip222 Date: Tue, 23 Dec 2025 12:16:19 +0300 Subject: [PATCH] hot fx 2 --- backend/.dockerignore | 34 ++++++++++++++++++++++++++++++++++ tg_bot/.dockerignore | 35 +++++++++++++++++++++++++++++++++++ tg_bot/Dockerfile | 4 ++-- tg_bot/main.py | 6 ------ 4 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 backend/.dockerignore create mode 100644 tg_bot/.dockerignore diff --git a/backend/.dockerignore b/backend/.dockerignore new file mode 100644 index 0000000..4b40bcc --- /dev/null +++ b/backend/.dockerignore @@ -0,0 +1,34 @@ +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python + +venv/ +env/ +ENV/ +.venv/ + +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store + +.git/ +.gitignore +.gitattributes + +Dockerfile* +docker-compose*.yml +.dockerignore + +drone.yml + +tmp/ +temp/ +*.tmp + +Thumbs.db +.DS_Store \ No newline at end of file diff --git a/tg_bot/.dockerignore b/tg_bot/.dockerignore new file mode 100644 index 0000000..8591ab4 --- /dev/null +++ b/tg_bot/.dockerignore @@ -0,0 +1,35 @@ +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python + +venv/ +env/ +ENV/ +.venv/ + +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store + +.git/ +.gitignore +.gitattributes + +Dockerfile* +docker-compose*.yml +.dockerignore + +drone.yml + +tmp/ +temp/ +*.tmp + +Thumbs.db +.DS_Store + diff --git a/tg_bot/Dockerfile b/tg_bot/Dockerfile index baea381..4d4f728 100644 --- a/tg_bot/Dockerfile +++ b/tg_bot/Dockerfile @@ -10,9 +10,9 @@ RUN apt-get update && apt-get install -y \ COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -COPY . . +COPY . ./tg_bot/ ENV PYTHONPATH=/app ENV PYTHONUNBUFFERED=1 -CMD ["python", "main.py"] \ No newline at end of file +CMD ["python", "tg_bot/main.py"] \ No newline at end of file diff --git a/tg_bot/main.py b/tg_bot/main.py index fa162e7..75d2fdd 100644 --- a/tg_bot/main.py +++ b/tg_bot/main.py @@ -1,11 +1,5 @@ import asyncio import logging -import sys -import os - -current_dir = os.path.dirname(os.path.abspath(__file__)) -parent_dir = os.path.dirname(current_dir) -sys.path.insert(0, parent_dir) from tg_bot.config.settings import settings