From c0073c441b3c60762bfe3c3239c4e57e1a142643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Thu, 17 Jan 2019 10:52:29 +0100 Subject: [PATCH] Solve unavailable mysql on cold start When booting for the first time, mysql has not properly initialized its data. Here, we boot and stop mysql to make sure the root user has been properly created. --- deploy/local/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy/local/Makefile b/deploy/local/Makefile index 836b601..7a2cc31 100644 --- a/deploy/local/Makefile +++ b/deploy/local/Makefile @@ -55,8 +55,11 @@ env: ## Generate the environment from templates and configuration values ##################### Database -databases: provision-databases migrate provision-oauth2 ## Bootstrap databases +databases: init-mysql provision-databases migrate provision-oauth2 ## Bootstrap databases +init-mysql: ## Make sure that mysql is properly initialized + docker-compose up -d mysql + docker-compose stop mysql provision-databases: ## Create necessary databases and users $(DOCKER_COMPOSE_RUN) -v $(PWD)/../env/openedx/scripts:/openedx/scripts lms /openedx/scripts/provision.sh provision-oauth2: ## Create users for SSO between services