aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2017-10-19 10:33:20 +0200
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2017-10-19 10:33:20 +0200
commit9872c1abfb4326c85e4f8175b4bd2a23f2e1c9f0 (patch)
tree6bea4d1bd75792c991c4624ecd038c8c65d209af
parentdce0b69dcec1555c88ef0cd813810d3c1519a3bf (diff)
Enforce container boot order
Make sure that so container is started only when db is ready to connect Change-Id: I6ba1d9df7837f482def82d33b90fe5be52c686dd Issue-ID: SO-208 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
-rw-r--r--docker-compose.yml9
1 files changed, 7 insertions, 2 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index 65da92f..7cf32df 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,4 +1,4 @@
-version: '2'
+version: '2.1'
networks:
default:
driver: bridge
@@ -21,6 +21,10 @@ services:
options:
max-size: "30m"
max-file: "5"
+ healthcheck:
+ test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
+ timeout: 20s
+ retries: 10
mso:
image: openecomp/mso
ports:
@@ -35,7 +39,8 @@ services:
hostname:
mso.mso.testlab.openecomp.org
depends_on:
- - mariadb
+ mariadb:
+ condition: service_healthy
logging:
driver: "json-file"
options: