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

Add support for DDEV #15

Closed
hussainweb opened this issue May 18, 2021 · 0 comments · Fixed by #16
Closed

Add support for DDEV #15

hussainweb opened this issue May 18, 2021 · 0 comments · Fixed by #16

Comments

@hussainweb
Copy link
Member

It's about time we supported DDEV. Unfortunately, it didn't turn out to be as simple as I hoped. I was hoping that DDEV's database images would support loading SQL files from /docker-entrypoint-initdb.d. It doesn't. This is because DDEV provides its own entrypoint which doesn't support loading files this way.

However, the base image's entrypoint is still present in the image and we can call its functions. Again, we have to do extra work as DDEV's entrypoint deletes the contents of /var/lib/mysql on initialization. We have to work with how DDEV manages backups (snapshots) and place our files there (in /mysqlbase). Essentially, we should import the SQL file, run the same commands as DDEV does (in create_base_db.sh, and create the new image with these contents. The image size increases significantly this way which can be avoided if this feature is available upstream.

It turns out there might be a workaround where DDEV wouldn't delete /var/lib/mysql but since it is a better idea to have this upstream, we should implement the earlier strategy.

Additionally, the plugin would need a separate Dockerfile for DDEV support (so that we can add our scripts). This means we should somehow let the user specify if the DDEV configuration should be used.

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 a pull request may close this issue.

1 participant