e30920067f
- Updated docker-compose.yml to expose dashboard on port 8080. - Enhanced main.py with timezone database caching and improved state management. - Introduced a minimal dashboard using Flask to display webhook status and notifications. - Added templates.json for customizable embed messages in Discord notifications. - Created templates.py for loading and saving notification templates. - Implemented tests for dashboard rendering and main functionality. - Added requirements for Flask and tzdata to support new features. - Included test cases for timezone handling and template management.
23 lines
448 B
Docker
23 lines
448 B
Docker
# Use official Python image
|
|
FROM python:3.12-alpine
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy requirements and install Python dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Dashboard (Flask) port
|
|
EXPOSE 8080
|
|
|
|
# Create a non-root user
|
|
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
|
USER appuser
|
|
|
|
# Command to run the application
|
|
CMD ["python", "main.py"]
|