Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/docker compose anchors #449

Conversation

dongwook-chan
Copy link
Collaborator

Overview

This PR refactors the existing Docker Compose configuration to use YAML anchors and Docker Compose extensions. This enhances the maintainability and readability of the Docker Compose file, especially when adding new MySQL services to test various MySQL versions.

Changes

Leveraged YAML anchors for common service attributes
Used Docker Compose extensions to reduce redundancy
Modify Docker Compose to mitigate errors in previous tests

Benefits

  • Scalability
    Makes it easier to add new MySQL versions for testing without redundant code
    Maintainability: Centralizes common configuration elements, making future updates more straightforward
  • Readability
    Makes the docker-compose.yml file more readable and easier to understand
    How to Test

dongwook-chan and others added 10 commits August 24, 2023 07:20
…lle#410

- `log_slave_updates` modifies to which file binlog events is written.
- The variable is not applicable to python-mysql-replication, because no file is written
…roved readability and expandability

Changes:
- Updated version to 3.4 at which extension for docker compose was first introduced
- Use extension to hold common fields and anchors to reference the extensions
@dongwook-chan dongwook-chan marked this pull request as ready for review August 26, 2023 06:47
@julien-duponchelle
Copy link
Owner

Indeed much better

@julien-duponchelle julien-duponchelle merged commit 6801e69 into julien-duponchelle:main Aug 26, 2023
4 checks passed
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.

None yet

4 participants