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(docker): update & simplify docker mysql setup #4565

Merged
merged 4 commits into from
Feb 17, 2025
Merged

Conversation

marcelgerber
Copy link
Member

@marcelgerber marcelgerber commented Feb 17, 2025

I noticed that we're using an outdated Docker image (mysql-server) that hasn't been updated for two years.
mysql is now the official and recommended image, and unlike a few years ago it now also has a release for ARM Macs.

So, we're now using mysql:8, which currently points to 8.4.
It may make sense to update to mysql:9 at some point, however we can only upgrade the DB in-place from a LTS release, which we are not currently on. Also, this would entail updating our prod servers, so...

While playing around with this stuff, I also noticed that the custom mysql-init-docker container we are creating is entirely unnecessary: all the cli tools we need to run the update script (mostly just gunzip and a few other basics) are already part of the mysql:8 installation. Which means, we can now just use the mysql:8 image instead :)

For review purposes: You can go by commits here, they are self-contained.

Things I tested:

  • ✅ Running in a new repo: It properly downloads and fills the DB, and the admin server starts up
  • ✅ Running in an existing repo: It properly upgrades the DB file in-place.
  • ✅ DB tests run fine

`skip-host-cache` is no longer supported, and using it would cause an error
it is not needed any more, all the utils are pre-installed in the mysql image already
@marcelgerber marcelgerber marked this pull request as ready for review February 17, 2025 09:38
@owidbot
Copy link
Contributor

owidbot commented Feb 17, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-mysql-docker

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2025-02-17 09:45:36 UTC
Execution time: 1.25 seconds

Copy link
Contributor

@Marigold Marigold left a comment

Choose a reason for hiding this comment

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

Tested it locally and everything worked as expected. Nice cleanup!

Copy link
Contributor

danyx23 commented Feb 17, 2025

I haven't played with it but it all looks fine - thanks for the cleanup!

@marcelgerber marcelgerber merged commit 6896d00 into master Feb 17, 2025
34 checks passed
@marcelgerber marcelgerber deleted the mysql-docker branch February 17, 2025 13:09
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.

4 participants