feat: Implement health checks, rate limiting, and security headers for services, update Node.js versions, and add Prettier configuration for frontend.

This commit is contained in:
2026-03-12 17:09:05 -03:00
parent 5e3db5f2a2
commit f9f1238310
21 changed files with 966 additions and 109 deletions
+11 -6
View File
@@ -1,15 +1,20 @@
# Build stage for Rust LMS
FROM rustlang/rust:nightly AS rust-builder
WORKDIR /usr/src/app
# Copy only necessary files for Rust build to optimize cache
COPY Cargo.toml Cargo.lock ./
COPY services ./services
COPY shared ./shared
# Install system dependencies first
RUN apt-get update && apt-get install -y pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
# Copy entire project for building (simpler and more reliable)
COPY Cargo.toml Cargo.lock ./
COPY shared/ ./shared/
COPY services/ ./services/
# Build the LMS service
RUN cargo build --release -p lms-service
# Build stage for Next.js Experience
FROM node:18-alpine AS node-builder
FROM node:20-alpine AS node-builder
WORKDIR /app
COPY web/experience/package*.json ./
RUN npm ci
@@ -21,7 +26,7 @@ ENV NEXT_PUBLIC_CMS_API_URL=$NEXT_PUBLIC_CMS_API_URL
RUN npm run build
# Final stage
FROM node:18-slim AS runner
FROM node:20-slim AS runner
WORKDIR /app
ENV NODE_ENV production