Update dockerfile

This commit is contained in:
2025-08-10 06:52:54 -07:00
parent 5b393de135
commit 0a5dcc6701

View File

@@ -19,6 +19,9 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Create directories for persistent storage
RUN mkdir -p /data/logs
# Create a non-root user and switch to it
RUN useradd -m botuser && chown -R botuser:botuser /app
USER botuser
@@ -28,4 +31,4 @@ ENV PYTHONUNBUFFERED=1
ENV CONFIG_PATH=/app/config.ini
# Command to run the bot
CMD ["python", "pterodisbot.py"]
CMD ["sh", "-c", "python generate_config.py && python pterodisbot.py"]