Initial commit: Add infrastructure and bot project
This commit is contained in:
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Установка системных зависимостей
|
||||
RUN apt-get update && apt-get install -y \
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Установка рабочей директории
|
||||
WORKDIR /app
|
||||
|
||||
# Копирование файлов зависимостей
|
||||
COPY requirements.txt .
|
||||
|
||||
# Установка Python зависимостей
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Копирование исходного кода
|
||||
COPY . .
|
||||
|
||||
# Создание пользователя для безопасности
|
||||
RUN groupadd -g 1000 monitor && \
|
||||
useradd -m -u 1000 -g monitor monitor && \
|
||||
chown -R 1000:1000 /app
|
||||
USER 1000
|
||||
|
||||
# Команда по умолчанию для запуска мониторинга
|
||||
CMD ["python", "infra/monitoring/main.py"]
|
||||
Reference in New Issue
Block a user