-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 [fix] Fix Port Mapping Issue (#62)
* 🐛 Fix: Add port initializiation for Docker Compose This commit adds significant logging for debugging as well as port initialization if a specified port is not found in the existing config file. * 🚑️ Add port validation before manuscript deployment This commit validates and assigns ports before deploying manuscripts, ensuring that ports for graphQL , the database, and the manuscript itself are all properly assigned. * ♻️ [chore] Move Port Verification to Pkg This commit moves the port verification out of deploy manuscript and into the common_command.go file in the pkg package. The idea would be to gradually migrate common methods to a single source so that the script is easier to follow and debug. * 🐛 [fix] Fix overlapping ports upon manuscript init This commit modifies GetListeningPorts() in common_command.go so as to make it more robust. Instead of just looking at system ports. It evaluates docker container ports and system ports comprehensively to ensure that port conflicts don't occur. It also continues the migration of system functionality to the common_command.go inside pkg package for better encapsulation. * 🎨 DRY out createDockerComposeFile function Applied principle of D.R.Y. - don't repeat yourself - to init_manuscripts.go. Now, instead of reusing similar logic to assign ports, it uses the common pkg.InitialzePorts function on the manuscript to assign new ports. This is a significantly cleaner implementation as it means that we'll only need to change the logic in one location going forward. * 🎨 Clean up duplicate FindAvailablePort definition Due to previous commmits, the FindAvailablePort() is now defined in pkg/common_command.go and no longer needs to be put here in init_manuscript.go. It is now being removed for clarity.
- Loading branch information
1 parent
2e9542e
commit 7084741
Showing
3 changed files
with
133 additions
and
70 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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