feat: добавить Docker-файлы для деплоя бота
This commit is contained in:
parent
66d188c1cd
commit
054422b764
10
.dockerignore
Normal file
10
.dockerignore
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
__pycache__
|
||||||
|
*.pyc
|
||||||
|
.pytest_cache
|
||||||
|
.git
|
||||||
|
.env
|
||||||
|
data/
|
||||||
|
*.egg-info
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
13
Dockerfile
Normal file
13
Dockerfile
Normal 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
9
docker-compose.yml
Normal 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
|
||||||
Loading…
x
Reference in New Issue
Block a user