feat: seperate webintreface

This commit is contained in:
2025-10-22 10:35:23 -04:00
committed by sbcrumb
parent c84d08b266
commit decad07a0d
21 changed files with 4900 additions and 25 deletions
+40
View File
@@ -0,0 +1,40 @@
# 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"]