Skip to content

WIP no recreate and log compose changes#2407

Closed
Marketen wants to merge 1 commit intodevelopfrom
marc/composechanged
Closed

WIP no recreate and log compose changes#2407
Marketen wants to merge 1 commit intodevelopfrom
marc/composechanged

Conversation

@Marketen
Copy link
Contributor

@Marketen Marketen commented Mar 9, 2026

This pull request makes improvements to how Docker Compose files are managed and containers are recreated, focusing on preventing unnecessary container restarts and ensuring accurate detection of configuration changes. The main changes involve removing hardcoded DNS entries, updating test cases, and enhancing the logic for detecting and handling compose file modifications in the StakerComponent.

Compose file management improvements:

  • Updated ComposeEditor to use delete service.dns instead of setting it to undefined, preventing dns: null from appearing in the YAML and avoiding unnecessary container recreation by Docker Compose.

Test updates for DNS removal:

  • Modified unit tests in network.test.ts to remove references to dns: undefined, aligning tests with the updated compose file logic. [1] [2]

StakerComponent enhancements:

  • Added logic in StakerComponent to read the compose YAML before and after applying user settings, detect actual changes, and only allow Docker Compose to recreate containers when the file has changed—otherwise, it uses --no-recreate to minimize downtime.
  • Introduced fs import to support reading compose files for change detection.

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

@Marketen Marketen closed this Mar 10, 2026
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.

1 participant