chore: Update Docker configuration and documentation
Some checks failed
API Docs (Node.js Express) / test (20) (push) Failing after 1m49s
API Docs (Node.js Express) / build (push) Has been skipped
API Gateway (Java Spring Boot) / test (17) (push) Failing after 3m18s
Docker Build and Push / setup (push) Successful in 10s
API Gateway (Java Spring Boot) / test (21) (push) Successful in 1m56s
API Gateway (Java Spring Boot) / build (push) Has been skipped
Docker Build and Push / build-push-service-adapters (push) Failing after 29s
Docker Build and Push / build-push-api-gateway (push) Failing after 32s
Docker Build and Push / build-push-api-docs (push) Failing after 31s
Docker Build and Push / build-push-frontend (push) Failing after 28s
Docker Build and Push / test-compatibility (push) Has been skipped
Integration Tests / integration-tests (push) Failing after 2m47s
Integration Tests / performance-tests (push) Has been skipped

### Summary of Changes
- Enhanced `docker-compose` files to include BuildKit compatibility settings for improved caching during builds.
- Updated service definitions to use pre-built images from the specified Docker registry, ensuring consistency across environments.
- Added Docker registry configuration to the `.env` example file for clarity on deployment settings.
- Revised the `README.md` to include instructions for using pre-built images and local development setups, along with Docker compatibility troubleshooting steps.
- Introduced health checks in the `Dockerfile` for the API Docs service to ensure container readiness.

### Expected Results
- Improved build performance and deployment clarity, facilitating easier setup for new developers and enhancing overall project maintainability.
This commit is contained in:
GSRN
2025-09-18 00:28:21 +02:00
parent af33bc2d20
commit 7bb753e293
10 changed files with 361 additions and 28 deletions

View File

@@ -1,18 +1,31 @@
FROM node:18-alpine
FROM node:20-alpine
# Set working directory
WORKDIR /app
# Copy package files
# Copy package files first for better caching
COPY package*.json ./
# Install dependencies
RUN npm install --only=production
# Install dependencies with npm ci for production builds
RUN npm ci --only=production && npm cache clean --force
# Copy source code
COPY . .
# Create non-root user for security
RUN addgroup -g 1001 -S nodejs && \
adduser -S nextjs -u 1001
# Change ownership of the app directory
RUN chown -R nextjs:nodejs /app
USER nextjs
# Expose port
EXPOSE 8083
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8083/health || exit 1
# Start the application
CMD ["npm", "start"]

View File

@@ -1,18 +1,31 @@
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
# Copy package files first for better caching
COPY package*.json ./
# Install dependencies
RUN npm install
# Install dependencies with npm ci for production builds
RUN npm ci --only=production && npm cache clean --force
# Copy source code
COPY . .
# Create non-root user for security
RUN addgroup -g 1001 -S nodejs && \
adduser -S nextjs -u 1001
# Change ownership of the app directory
RUN chown -R nextjs:nodejs /app
USER nextjs
# Expose port
EXPOSE 8083
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8083/health || exit 1
# Start the application in development mode
CMD ["npm", "run", "dev"]

View File

@@ -2,7 +2,6 @@ package com.labfusion.config;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.servers.Server;
import io.swagger.v3.oas.models.security.SecurityRequirement;