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