Skip to content
Open
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
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# LLM Configuration
# Set to "true" for local LLM (e.g., Ollama), "false" for remote LLM (e.g., OpenAI)
LLM_LOCAL=false

# Base URL for local LLM API (only used when LLM_LOCAL=true)
LLM_BASE_URL=http://llmserver:11434/

# API Keys for different LLM providers
OPENAI_API_KEY=your-openai-api-key-here
OLLAMA_API_KEY=
ANTHROPIC_API_KEY=
DEEPSEEK_API_KEY=

# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/
MONGODB_DATABASE=energenius
MONGODB_COLLECTION=documents
# Application Settings
STREAMLIT_SERVER_PORT=8501
STREAMLIT_SERVER_ADDRESS=0.0.0.0
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,18 @@ private_settings.py
# Mac
.DS_Store

# Temporary files
*.tmp
*.bak
*.log
# Traing data
/knowledge_base/files/


*/.streamlit/
*/.vscode/
*/prompt.txt

# Project-specific CI/CD and analysis files
sonar-project.properties
.gitlab-ci.yml
37 changes: 37 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM python:3.13-slim

# Set working directory
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*

# Copy requirements files
COPY requirements.txt /app/

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . /app/

# Create directories for knowledge base storage
RUN mkdir -p /app/knowledge_base/temp_pdfs

# Expose Streamlit default port
EXPOSE 8501

# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl --fail http://localhost:8501/_stcore/health || exit 1

# Run the Streamlit app
CMD ["streamlit", "run", "document_manager_ui.py", "--server.port=8501", "--server.address=0.0.0.0"]
Loading