Files
telegram-helper-bot/Dockerfile.bot
Andrey c68db87901 Refactor project structure and enhance Docker support
- Removed unnecessary `__init__.py` and `Dockerfile` to streamline project organization.
- Updated `.dockerignore` and `.gitignore` to improve exclusion patterns for build artifacts and environment files.
- Enhanced `Makefile` with new commands for managing Docker containers and added help documentation.
- Introduced `pyproject.toml` for better project metadata management and dependency tracking.
- Updated `requirements.txt` to reflect changes in dependencies for metrics and monitoring.
- Refactored various handler files to improve code organization and maintainability.
2025-08-29 16:49:28 +03:00

35 lines
1.1 KiB
Docker

FROM python:3.9-slim
# Установка системных зависимостей
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/*
# Создание рабочей директории
WORKDIR /app
# Копирование requirements.txt
COPY requirements.txt .
# Создание виртуального окружения
RUN python -m venv .venv
# Обновление pip в виртуальном окружении
RUN . .venv/bin/activate && pip install --upgrade pip
# Установка зависимостей в виртуальное окружение
RUN . .venv/bin/activate && pip install --no-cache-dir -r requirements.txt
# Копирование исходного кода
COPY . .
# Активация виртуального окружения
ENV PATH="/app/.venv/bin:$PATH"
ENV VIRTUAL_ENV="/app/.venv"
# Открытие порта для метрик
EXPOSE 8000
# Команда запуска через виртуальное окружение
CMD [".venv/bin/python", "run_helper.py"]