fix: use original_server for log drain config in generate_compose_file #7619
+1
−1
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.
Summary
When build server is enabled,
$this->serveris switched to point to$this->build_serverbefore callinggenerate_compose_file(). Insidegenerate_compose_file(), the log drain configuration check was using$this->serverwhich would incorrectly check the build server's settings instead of the deployment server where the container actually runs.Changes
$this->server->isLogDrainEnabled()to$this->original_server->isLogDrainEnabled()on line 2616Root Cause
The
$this->original_servervariable is explicitly initialized to preserve the deployment server reference before any build server switching occurs. Log draining is a runtime concern for the deployment server, not a build-time concern for the build server.User Impact
Users with build server enabled who have different configurations between their build and deployment servers will experience incorrect behavior. For example, enabling log draining on the deployment server has no effect because Coolify checks the build server's log drain settings instead.
Testing