Files
nfoguard/nfoguard-web/Dockerfile.web
T
sbcrumb 6cc13ce156
Local Docker Build (Dev) / build-dev (push) Successful in 4s
feat: seperate webintreface
2025-10-22 10:35:23 -04:00

40 lines
1010 B
Docker

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