Dockerize the bashar bot

This commit is contained in:
2025-12-05 21:40:02 -05:00
parent ee89f394bd
commit 21c8c9c51d
5 changed files with 190 additions and 0 deletions

31
Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
# Use Python 3.11 slim image
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
libopus0 \
libopus-dev \
espeak \
libespeak-dev \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY bot.py .
COPY stt.py .
COPY goodboy.ogg .
# Create volume mount points for logs and data
VOLUME ["/app/logs", "/app/data"]
# Run the bot
CMD ["python", "-u", "bot.py"]