Skip to content

Add "if_needed" value for CREATE_NEW_DATABASE #7

merged 1 commit into from Sep 26, 2018

Conversation

mederly
Copy link

@mederly mederly commented Sep 26, 2018

This value means that the database is created only if MYSQL_DATADIR does not exist or is empty.

Rationale: For midPoint dockerization we need to preserve MariaDB content across container re-creation that occurs when docker-compose down and docker-compose up commands are issued. Although this effect could be achieved by setting CREATE_NEW_DATABASE to 1 on the first run and to 0 afterwards, it is quite complicated to ensure this. As an easier solution I see the introduction of a new value if_needed that would cause database creation only if MYSQL_DATADIR does not exist or is empty.

This value means that the database is created only if MYSQL_DATADIR
does not exist or is empty.
@pcaskey pcaskey merged commit ae67e47 into docker:mariadb10 Sep 26, 2018
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants