diff --git a/dockerfile b/dockerfile index 63b082f..ec2a432 100644 --- a/dockerfile +++ b/dockerfile @@ -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"] \ No newline at end of file +CMD ["sh", "-c", "python generate_config.py && python pterodisbot.py"] \ No newline at end of file