added docker

This commit is contained in:
Subinacls
2026-06-08 21:20:20 -04:00
parent fc9845772d
commit 9ca7d35ce0
4 changed files with 108 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
# Dockerfile for Excommunicado Discord Bot
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install system dependencies (if needed)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first (better layer caching)
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Create data directory for persistence
RUN mkdir -p /app/data
# Create non-root user for security
RUN useradd -m botuser && chown -R botuser:botuser /app
USER botuser
# Run the bot
CMD ["python", "bot.py"]