Dockerize the bashar bot
This commit is contained in:
31
Dockerfile
Normal file
31
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user