Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Environment Configuration
NODE_ENV=development
LOG_LEVEL=INFO

# Data Processing Configuration
DATA_PROCESSING_BATCH_SIZE=1000
DATA_PROCESSING_INTERVAL=5
MAX_QUEUE_SIZE=10000

# Model Configuration
MODEL_UPDATE_INTERVAL=300
MODEL_CONFIDENCE_THRESHOLD=0.7
ENABLE_CONTINUOUS_LEARNING=true

# Data Sources
ENABLE_MQTT_SOURCE=true
MQTT_BROKER_HOST=localhost
MQTT_BROKER_PORT=1883
MQTT_TOPICS=sensors/+/data,events/+

ENABLE_WEBSOCKET_SOURCE=true
WEBSOCKET_PORT=8765

ENABLE_API_SOURCE=true
API_PORT=8000

# Storage Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0

# Monitoring
ENABLE_METRICS=true
METRICS_PORT=8080
HEALTH_CHECK_INTERVAL=30

# Alert Configuration
ENABLE_ALERTS=true
ALERT_THRESHOLDS_ANOMALY=0.8
ALERT_THRESHOLDS_ERROR_RATE=0.1
84 changes: 84 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
*.manifest
*.spec

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Project specific
logs/
exports/
data/
*.log
*.pkl
*.joblib

# Docker
.dockerignore

# Temporary files
tmp/
temp/
*.tmp
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM python:3.9-slim

# Set working directory
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*

# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY proactive_mind/ ./proactive_mind/
COPY .env.example .env

# Create logs directory
RUN mkdir -p logs exports

# Expose ports
EXPOSE 8000 8080 8765

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1

# Run the application
CMD ["python", "-m", "proactive_mind.main"]
Loading