feat(deploy): sync cubemaster custom ports with .env config#210
Conversation
| : | ||
| } | ||
|
|
||
| patch_cubemaster_config_ports() { |
There was a problem hiding this comment.
patch? We should generate conf.yaml on the fly instead.
There was a problem hiding this comment.
for now the script just simply copy the file
How can we generate a YAML file based on the configuration? Is it necessary to introduce a new YAML parsing tool (such as yq)?
There was a problem hiding this comment.
I think the cubemaster.yaml should contain port placeholder and perform a replace before copying.
There was a problem hiding this comment.
Modified, use__CUBE_SANDBOX_MYSQL_PORT__and__CUBE_SANDBOX_REDIS_PORT__ placeholders in cubemaster.yaml
Use`__CUBE_SANDBOX_MYSQL_PORT__`and`__CUBE_SANDBOX_REDIS_PORT__` placeholders in cubemaster.yaml Signed-off-by: luzhixing12345 <luzhixing12345@163.com>
b10f768 to
607b9c8
Compare
|
Thanks @luzhixing12345 for the great contribution! This fix nicely addresses the custom port sync issue during self-build deployment. Appreciate the detailed problem description and clean implementation. 🎉 |
Related to #172
Problem
During self-build deployment, users may change
CUBE_SANDBOX_MYSQL_PORTorCUBE_SANDBOX_REDIS_PORTto avoid host port conflicts. However, CubeMaster still uses the default hardcoded addresses (127.0.0.1:3306and127.0.0.1:6379) from the static config file, causing service startup failures.As a result, CubeMaster cannot connect to MySQL during initialization and the one-click installation fails.
Solution
This PR patches the generated CubeMaster config during installation and synchronizes the MySQL/Redis addresses with the values provided in the one-click environment configuration.