feat : Add support for Docker service networks in ComposeService#683
feat : Add support for Docker service networks in ComposeService#683gabrieldemarmiesse merged 8 commits intogabrieldemarmiesse:masterfrom R3gardless:feat/python-on-whales-682
Conversation
…figService - Introduced ComposeServiceNetwork for enhanced network configuration. - Updated ComposeConfigService to include networks property for better service management.
- Introduced a new complex-compose.yml file for advanced service and network configurations. - Updated test cases to validate the new Compose setup and ensure proper functionality.
|
Thanks for the PR! From the error message, I guess our version of docker-compose in the ci is not recent enough. Can you try to change the version here: https://github.com/gabrieldemarmiesse/python-on-whales/blob/master/scripts/download-docker-plugins.sh ? |
|
@gabrieldemarmiesse Yes, you're right It seems like some arguments are not supported to current version:
Is there any plan to update docker-compose version? Thanks! |
|
update the file and then push the change in this pull request. I'm fine with using the latest version :) |
…tests - Updated docker-compose to v2.39.0 and buildx to v0.27.0 in the download script. - Added assertions for new network configurations in the test for complex compose.
|
@gabrieldemarmiesse Thank you for the review. I’ve updated |
- Changed buildx version from 0.27.0 to 0.13.0 for compatibility. - Ensured the latest version is downloaded for improved functionality.
|
It seems the Docker Engine version also needs to be upgraded to |
|
I think we cannot upgrade the engine in github actions, we might have to wait until github upgrade it, or we can try a slighly older version of docker-compose |
…tests - Removed the interface_name field from ComposeServiceNetwork model and updated the complex-compose.yml and test_compose.py accordingly. - This change simplifies the network configuration and ensures consistency across the codebase. 🚀
…tworks 🛠️ This change cleans up the test by removing the check for the default network, as it's not needed for the current test scenario. 🚀
|
@gabrieldemarmiesse Thanks, I agree. I think it would be better to upgrade the Docker Compose version and adjust +) Remove |
…n complex-compose.yml - Introduced hostname field to ComposeConfigService for better service identification. - Updated complex-compose.yml to include hostname for services. - Enhanced tests to validate hostname configurations. 🚀
|
All the test cases have passed now. Could you take a look at my PR when you get a chance? |
|
Thanks, sorry for the delay, everything looks good, but could you revert the uv.lock to its normal state? Thanks! |
|
@gabrieldemarmiesse Yes, I reverted |
|
@gabrieldemarmiesse Sorry to bother you. Thanks! |
|
Apologies for the delay, it's all good, thanks! |
88eae67
into
gabrieldemarmiesse:master
|
Thanks for reviewing and merging this PR. If possible, could you let me know when this feature will be released? Thanks! |
resolve #682
Hi!
This PR adds support for Docker service networks in Docker Compose.
I implemented
ComposeServiceNetworkbased on the official documentation.Additionally, I updated the test cases in
complex-compose.yml. (I assumedcomlexe-compose.ymlwas a typo and corrected it—if that’s not the case, please let me know.)Please let me know if I misunderstood or made any mistakes in the implementation.
Thanks!