From f5c16f81b0df7c7db2abc8b1e5b7a2b8279f5cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 3 Sep 2019 09:34:44 +0200 Subject: [PATCH] Nicer sleep commands for mysql-client container --- tutor/templates/k8s/deployments.yml | 2 +- tutor/templates/local/docker-compose.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tutor/templates/k8s/deployments.yml b/tutor/templates/k8s/deployments.yml index 771897da91..f345380fcf 100644 --- a/tutor/templates/k8s/deployments.yml +++ b/tutor/templates/k8s/deployments.yml @@ -354,7 +354,7 @@ spec: - name: mysql image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_MYSQL }} command: ["sh", "-e", "-c"] - args: ["while true; do echo 'ready'; sleep 10; done"] + args: ["echo 'ready'; while true; do sleep 60; done"] {% if ACTIVATE_SMTP %} --- apiVersion: apps/v1 diff --git a/tutor/templates/local/docker-compose.yml b/tutor/templates/local/docker-compose.yml index 75bb9ecf77..1442bf8241 100644 --- a/tutor/templates/local/docker-compose.yml +++ b/tutor/templates/local/docker-compose.yml @@ -30,8 +30,9 @@ services: {% endif %} mysql-client: image: {{ DOCKER_REGISTRY }}{{ DOCKER_IMAGE_MYSQL }} - command: sh - restart: "no" + entrypoint: ["sh", "-e", "-c"] + command: ["echo 'ready'; while true; do sleep 60; done"] + restart: unless-stopped {% if ACTIVATE_MYSQL%}depends_on: - mysql{% endif %}