This repository contains a custom mysql docker image. Changes we have made:
- With the command
serlo-mysqlyou can use the MySQL clientmysqltogether with default settings (user, password, database) for accessing theserloDB. - The command line tool
pvis available as well. It provides a progress bar when a.sqlfile is imported. Usage:pv file.sql | serlo-mysql
In order to change the DB image via DB migrations do the following:
- Run MySQL DB in this repository with
make up. - Run DB migrations
- Check the changes in the DB via
make mysql. - Make a new dump via
make dumpandmake zipand commit your changes.
In order to automatically create the latest image, change the version at file VERSION and merge into main will.
In order to publish a prerelease push to a branch with a name starting with prerelease. Then an image with a tag similar to the branch name is published. For example: a remote branch name like prerelease-feature1 will created an image which you can access via ghcr.io/serlo/serlo-mysql-database:prerelease-feature1. This is for example useful when you need DB migrations in order to develop a new feature.