Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements to both the container registration workflow and the reverse proxy configuration system. The changes ensure more reliable port assignments, improve logging and debugging, and enhance the generated NGINX configuration to support both HTTP and stream (TCP/UDP) services. Key changes are grouped below.
Container registration and port assignment improvements:
nextAvailablePortInRangeto theServicemodel to reliably find the next available external port for a given protocol type, preventing port conflicts and improving scalability. This is now used for SSH and additional protocol port assignments instead of relying on iptables parsing. [1] [2] [3]register-container.sh) now delegates port assignment to the API, removing local iptables-based port management logic. The assigned SSH port is extracted from the API response. [1] [2] [3]Logging and debugging enhancements:
morganHTTP request logger middleware into the Node.js server for improved request logging and debugging. [1] [2] [3] [4] [5] [6]NGINX configuration improvements:
nginx.confinstead of a single site config, aligning with the new template structure.API and environment flexibility:
Deployment:
API Server:
git pullnpm isystemctl restart container-creator.serviceLoad Balancer:
git pullrm /etc/nginx/conf.d/reverse-proxy.conf*/opt/opensource-server/nginx-reverse-proxy/pull-config.shProxmox Host:
register-container.shto/var/lib/vz/snippetsFirewall: