Skip to content

Conversation

@kastov
Copy link
Collaborator

@kastov kastov commented Aug 16, 2025

No description provided.

@kastov kastov merged commit 7b7035c into main Aug 16, 2025
4 checks passed
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR implements a comprehensive release update (v2.1.3) that focuses on improving application lifecycle management and development tooling. The primary change addresses a critical architectural issue where the internal Express server lacked proper shutdown handling, which could lead to resource leaks and ungraceful shutdowns in containerized environments.

The main technical improvement is in main.ts, where shutdown handling for the internal Express server is properly implemented. The application runs two servers - a main NestJS HTTPS server and an internal Express server on localhost. Previously, only the main application had shutdown hooks enabled, but the internal server would continue running after the main application terminated. The fix moves app.enableShutdownHooks() to after the internal server setup and adds explicit SIGINT/SIGTERM signal handlers with a flag to prevent double-closing.

Consistent shutdown lifecycle handling is also added to key modules (RemnawaveNodeModules and InternalModule) by implementing the OnApplicationShutdown interface, providing better observability during application termination. This is particularly important for the global InternalModule that manages critical state like Xray configuration and inbound hash maps.

The release includes several development and deployment improvements: a new Makefile for automated version management and signed git tagging, a new docker-compose-local.yml for local production-like testing, Docker production optimizations with proper environment variables and direct Node.js execution, and cleanup of unused Docker Compose configurations.

These changes align the codebase with modern containerized application best practices, ensuring proper resource cleanup and providing better tools for the development and release workflow.

Confidence score: 5/5

  • This PR is safe to merge with minimal risk as it addresses important infrastructure improvements
  • Score reflects well-tested shutdown handling patterns and standard release practices with no breaking changes
  • No files require special attention as all changes follow established patterns and best practices

8 files reviewed, 2 comments

Edit Code Review Bot Settings | Greptile

npm version minor --no-git-tag-version
@echo "New version: $$(node -p "require('./package.json').version")"
npm install
# Bump major version (1.0.0 -> 2.0.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Missing blank line after comment, inconsistent with formatting used for other targets

Comment on lines +39 to +42




Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Remove unnecessary trailing blank lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants