patching voting system

This commit is contained in:
Subinacls
2026-06-09 07:22:08 -04:00
parent a789fb131f
commit 154735e133
4 changed files with 116 additions and 16 deletions
+10 -5
View File
@@ -1,6 +1,11 @@
# Dockerfile for Excommunicado Discord Bot
FROM python:3.12-slim
# Unbuffered stdout/stderr so logs appear immediately in `docker logs`
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
LOG_LEVEL=INFO
# Set working directory
WORKDIR /app
@@ -13,11 +18,11 @@ 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
# Create non-root user and give it ownership of the app + data directory.
# UID/GID 1000 is referenced by the named-volume / chown instructions in the README.
RUN useradd -m -u 1000 botuser \
&& mkdir -p /app/data \
&& chown -R botuser:botuser /app
USER botuser
# Run the bot