Add ThreatHunt agent backend/frontend scaffolding

This commit is contained in:
2025-12-29 10:22:57 -05:00
parent dc2dcd02c1
commit d0c9f88268
35 changed files with 21929 additions and 42 deletions

43
Dockerfile.frontend Normal file
View File

@@ -0,0 +1,43 @@
# ThreatHunt Frontend - Node.js React
FROM node:18-alpine AS builder
WORKDIR /app
# Copy package files
COPY frontend/package.json frontend/package-lock.json* ./
# Install dependencies
RUN npm ci
# Copy source
COPY frontend/public ./public
COPY frontend/src ./src
COPY frontend/tsconfig.json ./
# Build application
RUN npm run build
# Production stage
FROM node:18-alpine
WORKDIR /app
# Install serve to serve the static files
RUN npm install -g serve
# Copy built application from builder
COPY --from=builder /app/build ./build
# Create non-root user
RUN addgroup -g 1000 appuser && adduser -D -u 1000 -G appuser appuser
USER appuser
# Expose port
EXPOSE 3000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost:3000/ || exit 1
# Serve application
CMD ["serve", "-s", "build", "-l", "3000"]