Updated README, added Dockerfile
This commit is contained in:
1 parent
7ba729f372
commit
dd671dba8c
3 files changed
+234
-1
No files matched your search
+29
@@ -0,0 +1,29 @@
|
||||
# ---- Base image ----
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies (if needed by native extensions)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and install Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy plugin assets
|
||||
COPY plugins/pepe/pepes.txt ./plugins/pepe/pepes.txt
|
||||
|
||||
# Copy the rest of the application
|
||||
COPY . .
|
||||
|
||||
# Create a non-root user for security
|
||||
RUN useradd -m -s /bin/bash botuser && chown -R botuser:botuser /app
|
||||
USER botuser
|
||||
|
||||
# Expose nothing by default (Discord bot doesn't need a public port)
|
||||
|
||||
# Run the bot
|
||||
CMD ["python", "main.py"]
|
||||
Reference in new issue
Block a user