From 8c5a62d645cab7bcae362a9b534e89db12064298 Mon Sep 17 00:00:00 2001 From: Dhaval Soneji Date: Thu, 25 Jun 2020 12:28:35 +0100 Subject: [PATCH] make app wait for db to start up first Fix for #163 Prevents using memory database if db is still starting up --- docker/docker-compose/with-mysql/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose/with-mysql/docker-compose.yml b/docker/docker-compose/with-mysql/docker-compose.yml index dc876d89..c6f1014d 100644 --- a/docker/docker-compose/with-mysql/docker-compose.yml +++ b/docker/docker-compose/with-mysql/docker-compose.yml @@ -26,7 +26,7 @@ services: pigallery2: image: bpatrik/pigallery2:latest - command: --Server-Database-mysql-host=pigallery-db --Server-Database-mysql-username=pigallery2 --Server-Database-mysql-password=pigallery2_pass--Server-Database-mysql-database=pigallery2 + command: sh -c 'bin/wait-for pigallery-db:3306 -- --Server-Database-mysql-host=pigallery-db --Server-Database-mysql-username=pigallery2 --Server-Database-mysql-password=pigallery2_pass--Server-Database-mysql-database=pigallery2' container_name: pigallery2 environment: - NODE_ENV=production