-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
move database storage onto persistent volume outside of docker, allowing r/w access from within docker #630
Comments
some notes: to use an explicit host directory docker would need an additional bind mount, and the the complication being that since the goal is to get data on the host, it'd have to happen when the image is run not built that would lean me towards using official mysql image, and running it as a container. in theory, it isn't much more costly than native, and it will handle the startup and initialization automatically.
for documentation's sake, the previous docker setup used a volume instead of an explicit host directory. each volume is managed by docker as a single file and stored on the host machine ( on *nix hosts those wind up at some pro/cons of volumes:
( the choice of volume vs bind mount doesn't change the need to initialize the host side datadir. unfortunately. ) |
@ionous suggests above that we try something like https://hub.docker.com/_/mysql and so I'll try a |
We've been really struggling to try to resolve #829 within the current setup, and so we are thinking that we do this and then take another shot at it when there are fewer moving pieces. |
Currently, table storage is wherever ubuntu's mysql sticks it by default, inside of the container since that's where mysql is installed. The total size of storage needed is minimal; 200MByte would probably have us set for life. I suspect we need to reconfigure the ubuntu mysql package (inside the container, probably during image build) to point into something like /opt/shift-data/mysql and expose that directory or its parent to docker in the startup command. For bonus points, add some documentation around where it is and what is needed from a local dev to prepare their dev machine's filesystem to use this.
The text was updated successfully, but these errors were encountered: