This commit upgrades the project to Node.js 24 (LTS) and performs a major refactoring of the documentation to support both advanced users and AI-based automation (MCP). Changes: - Environment & CI/CD: - Set Node.js version to >=24 in package.json and .nvmrc. - Updated Dockerfile to use Node 24 base image. - Updated @types/node to ^24.10.9. - Documentation: - Refactored README.md with comprehensive technical reference, configuration details, and Zabbix-to-GraphQL mapping. - Created docs/howtos/cookbook.md with practical recipes for common tasks and AI test generation. - Updated docs/howtos/mcp.md to emphasize GraphQL's advantages for AI agents and Model Context Protocol. - Added readme.improvement.plan.md to track documentation evolution. - Enhanced all how-to guides with improved cross-references and up-to-date information. - Guidelines: - Updated .junie/guidelines.md with Node 24 requirements and enhanced commit message standards (Conventional Commits 1.0.0). - Infrastructure & Code: - Updated docker-compose.yml with Apollo MCP server integration. - Refined configuration and schema handling in src/api/ and src/datasources/. - Synchronized generated TypeScript types with schema updates.
26 lines
No EOL
635 B
Docker
26 lines
No EOL
635 B
Docker
# Hint: With node_version>=21.6.0 there are problems with debugging,
|
|
# therefore the development node version is set to 24 + in order to keep dev + prod versions aligned
|
|
# this was also reflected in the Dockerfile
|
|
ARG node_version=24
|
|
|
|
#stage1
|
|
FROM node:${node_version} as builder
|
|
WORKDIR /usr/app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run compile
|
|
|
|
#stage 2
|
|
FROM node:${node_version}
|
|
ARG API_VERSION
|
|
ENV API_VERSION=${API_VERSION}
|
|
WORKDIR /usr/app
|
|
COPY package*.json ./
|
|
RUN npm install --production
|
|
|
|
COPY --from=builder /usr/app/dist ./dist
|
|
ADD schema ./dist/schema
|
|
WORKDIR /usr/app/dist
|
|
CMD node ./index.js
|
|
EXPOSE 4000 |