# 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"]