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

chore: Make redis, postgres and rabbitmq hosts configurable via env variables #264

Merged
merged 7 commits into from
Mar 21, 2024

Conversation

lotooo
Copy link
Contributor

@lotooo lotooo commented Dec 27, 2023

I am trying to deploy our musicbrainz mirror in kubernetes using an external DB.

This PR updates the config files to read the db,redis,mq hosts from env variables and default them to the current value

Copy link
Contributor

@yvanzo yvanzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing to this repository.

The general idea is great.

I pushed a few amending commits to replace the last occurrences of db and redis in build files.

What is still missing:

  1. depends_on still refer to service names in compose files; See:
    git grep -Pw -- '- (db|mq|redis)' '**yml'
  2. Many occurences of db, mq and redis remain in helper scripts under the directory admin/; See:
    git grep -Pw 'db|mq|redis' admin/
  3. New variables have to be documented in README.md

For 1. I have no idea how to handle it or if it even matters when using Kubernetes.
For 2. & 3. I can do if needed whenever I have time but that isn’t my current priority.

@lotooo
Copy link
Contributor Author

lotooo commented Jan 26, 2024

Thanks for the feedback !

  1. doesn't need be changed as these stay the default values so it's fine to let them exist with the static name in the docker-compsoe file.

  2. I update the README.

Working on the 2. now.

@lotooo
Copy link
Contributor Author

lotooo commented Jan 26, 2024

For 2, I read those scripts (I just checked the one in the output of git grep -Pw 'db|mq|redis' admin/) and all of them are meant to be used locally and connect using docker-compose so there shouldn't have any impact (as the hosts name and the depends_on is not changed in the docker-compose.yml).

tldr; I don't think any of them has to be changed as they are not included in the Docker image and not meant to be executed from inside any of the containers.

@lotooo lotooo requested a review from yvanzo January 29, 2024 10:23
Even though some helper scripts won’t work anymore, these are not
strictly needed. One can either adapt these or run commands manually.
Copy link
Contributor

@yvanzo yvanzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for your contribution!

I improved the documentation you provided (for 3.) by mentioning that:

  • the unused services will still be running (for 1.),
  • some (dispensable) helper scripts will no longer work (for 2.),
  • (potentially) some actions can be needed when switching to a new back-end server.

@yvanzo yvanzo merged commit 82f54d7 into metabrainz:master Mar 21, 2024
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.

2 participants