feat: добавить Docker-файлы для деплоя бота

This commit is contained in:
deadzilla 2026-05-29 22:29:32 +05:00
parent 66d188c1cd
commit 054422b764
3 changed files with 32 additions and 0 deletions

10
.dockerignore Normal file
View File

@ -0,0 +1,10 @@
__pycache__
*.pyc
.pytest_cache
.git
.env
data/
*.egg-info
.venv/
venv/
env/

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM python:3.12-slim
WORKDIR /app
# Устанавливаем зависимости
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Копируем весь проект
COPY . .
# Запускаем бота
CMD ["python", "bot.py"]

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
services:
discord-bot:
build: .
container_name: discord-bot
restart: unless-stopped
environment:
- DISCORD_TOKEN=${DISCORD_TOKEN}
- MORNING_TIME=${MORNING_TIME:-07:00}
- PYTHONUNBUFFERED=1