You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 (increate_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.
The text was updated successfully, but these errors were encountered: