From 123a7f3d980fa1660fbcf8eef1e4740d81727a62 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 27 Oct 2020 10:50:59 +0100 Subject: Added mysql database volume --- srcs/mysql/entrypoint.sh | 13 +++++++------ srcs/mysql/mysql.yaml | 43 +++++++++++++++++++++---------------------- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'srcs/mysql') diff --git a/srcs/mysql/entrypoint.sh b/srcs/mysql/entrypoint.sh index 73e574e..80ec84c 100755 --- a/srcs/mysql/entrypoint.sh +++ b/srcs/mysql/entrypoint.sh @@ -3,11 +3,13 @@ mkdir -p /run/mysqld mkdir -p /var/lib/mysql -echo '-----------INSTALL-----------' -mysql_install_db --user=root --datadir=/var/lib/mysql +if [ ! -d /var/lib/mysql/mysql ] +then + echo '-----------INSTALL-----------' + mysql_install_db --user=root --datadir=/var/lib/mysql -echo '-----------SETUP-----------' -/usr/bin/mysqld --user=root --datadir=/var/lib/mysql --bootstrap <