From deec44fe44bb210e9041c00782e6fdbf0724fa5d Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Fri, 11 Oct 2013 00:05:08 +0530 Subject: [PATCH] start mysqld using supervisord --- resources/start | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/resources/start b/resources/start index dc934fc8..39ba1506 100755 --- a/resources/start +++ b/resources/start @@ -20,12 +20,23 @@ DB_INIT=${DB_INIT:-} # start mysql server if ${DB_HOST} is localhost if [ "${DB_HOST}" == "localhost" ]; then - DB_INIT="yes" - mysql_install_db --user=mysql - /usr/bin/mysqld_safe & - sleep 3 - echo 'CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;' | mysql -uroot - echo 'GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'root'@'localhost';' | mysql -uroot +DB_INIT="yes" +mysql_install_db --user=mysql +cat > /etc/supervisor/conf.d/mysqld.conf <