diff --git a/docker-compose.example.yml b/docker-compose.example.yml index 85cf759..cb19802 100644 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -69,14 +69,13 @@ services: # NFOGuard Web Interface nfoguard-web: - build: - context: ./nfoguard-web - dockerfile: Dockerfile.web + image: gitea.skalas.org/sbcrumb/nfoguard:latest # Same image as core! container_name: nfoguard-web restart: unless-stopped + command: ["python", "nfoguard-web/main_web.py"] # Different entry point env_file: - - nfoguard-web/.env.web.example - - nfoguard-web/.env.secrets.web.example # Create this file + - .env + - .env.secrets environment: - TZ=${TZ:-America/New_York} - WEB_HOST=0.0.0.0 diff --git a/nfoguard-web/.env.secrets.web.example b/nfoguard-web/.env.secrets.web.example deleted file mode 100644 index d33e32e..0000000 --- a/nfoguard-web/.env.secrets.web.example +++ /dev/null @@ -1,17 +0,0 @@ -# =========================================== -# NFOGuard Web Interface Secrets -# =========================================== -# SENSITIVE CONFIGURATION - DO NOT COMMIT TO VERSION CONTROL -# Copy this file to .env.secrets and update with your actual values - -# =========================================== -# DATABASE CREDENTIALS -# =========================================== -# Database password for web interface access -DB_PASSWORD=your_secure_database_password - -# =========================================== -# WEB AUTHENTICATION CREDENTIALS -# =========================================== -# Web interface authentication (if enabled) -WEB_AUTH_PASSWORD=your_secure_web_password \ No newline at end of file diff --git a/nfoguard-web/.env.web.example b/nfoguard-web/.env.web.example deleted file mode 100644 index 65d248c..0000000 --- a/nfoguard-web/.env.web.example +++ /dev/null @@ -1,57 +0,0 @@ -# =========================================== -# NFOGuard Web Interface Configuration -# =========================================== -# Configuration for the separated web interface container - -# =========================================== -# WEB SERVER SETTINGS -# =========================================== -# Web interface server configuration -WEB_HOST=0.0.0.0 -WEB_PORT=8081 -WEB_WORKERS=1 -WEB_DEBUG=false - -# Core NFOGuard API connection -CORE_API_HOST=nfoguard -CORE_API_PORT=8080 - -# =========================================== -# DATABASE CONFIGURATION (READ ACCESS) -# =========================================== -# Same database as core NFOGuard but optimized for web queries -DB_TYPE=postgresql -DB_HOST=nfoguard-db -DB_PORT=5432 -DB_NAME=nfoguard -DB_USER=nfoguard -# Set DB_PASSWORD in .env.secrets file - -# =========================================== -# WEB INTERFACE AUTHENTICATION -# =========================================== -# Optional authentication for web interface -WEB_AUTH_ENABLED=false -WEB_AUTH_USERNAME=admin -# Set WEB_AUTH_PASSWORD in .env.secrets file -WEB_AUTH_SESSION_TIMEOUT=3600 - -# =========================================== -# UI CUSTOMIZATION -# =========================================== -# Application branding -APP_TITLE=NFOGuard -APP_SUBTITLE=Database Management & Reporting - -# Interface settings -PAGINATION_LIMIT=50 -REFRESH_INTERVAL=30 - -# Logo configuration -LOGO_ENABLED=true - -# =========================================== -# TIMEZONE CONFIGURATION -# =========================================== -# Must match core NFOGuard timezone -TZ=America/New_York \ No newline at end of file diff --git a/nfoguard-web/Dockerfile.web b/nfoguard-web/Dockerfile.web deleted file mode 100644 index e967644..0000000 --- a/nfoguard-web/Dockerfile.web +++ /dev/null @@ -1,40 +0,0 @@ -# NFOGuard Web Interface Container -# Lightweight container for web interface only - -FROM python:3.11-slim - -# Set working directory -WORKDIR /app - -# Install system dependencies (minimal) -RUN apt-get update && apt-get install -y \ - libpq-dev \ - gcc \ - && rm -rf /var/lib/apt/lists/* - -# Copy requirements and install Python dependencies -COPY requirements_web.txt . -RUN pip install --no-cache-dir -r requirements_web.txt - -# Copy web application files -COPY config/ ./config/ -COPY core/ ./core/ -COPY api/ ./api/ -COPY static/ ./static/ -COPY logo/ ./logo/ -COPY main_web.py . - -# Create non-root user for security -RUN adduser --disabled-password --gecos '' webuser && \ - chown -R webuser:webuser /app -USER webuser - -# Expose web interface port (configurable via WEB_PORT env var) -EXPOSE 8081 - -# Health check for web interface -HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:${WEB_PORT:-8081}/ || exit 1 - -# Run web interface -CMD ["python", "main_web.py"] \ No newline at end of file diff --git a/nfoguard-web/requirements_web.txt b/nfoguard-web/requirements_web.txt deleted file mode 100644 index 6dd2a1b..0000000 --- a/nfoguard-web/requirements_web.txt +++ /dev/null @@ -1,15 +0,0 @@ -# NFOGuard Web Interface Dependencies -# Minimal dependencies for web-only container - -# Core web framework -fastapi==0.104.1 -uvicorn[standard]==0.24.0 - -# Database connectivity -psycopg2-binary==2.9.7 - -# Authentication and sessions -python-multipart==0.0.6 - -# Utilities -python-dotenv==1.0.0 \ No newline at end of file