Update Dockerfile

This commit is contained in:
DerrtSML 2025-06-23 17:06:20 +03:00 committed by GitHub
parent 01fa6aca7b
commit a5379b94ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,19 +1,27 @@
FROM python:3.10-slim-buster
WORKDIR /app
# Install build dependencies if necessary (only if other solutions fail)
RUN apt-get update && apt-get install -y build-essential libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# ... rest of your Dockerfile
# Устанавливаем рабочую директорию
WORKDIR /app
# Копируем файл зависимостей и устанавливаем их
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Устанавливаем системные зависимости
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
libssl-dev \
gcc \
libpq-dev \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Копируем остальные файлы приложения
# Копируем файл зависимостей
COPY requirements.txt .
# Устанавливаем зависимости
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Копируем остальной код
COPY . .
# Команда для запуска приложения
# Запускаем бота
CMD ["python", "bot.py"]