From 22c8651f436c7e47393c1ac5254260f73cb45f36 Mon Sep 17 00:00:00 2001 From: afinch7 Date: Mon, 27 Jul 2020 16:40:38 -0400 Subject: [PATCH] add health/live check to mysql actions service --- .github/workflows/ci.yml | 5 +++-- docker-compose.yml | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 docker-compose.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac070d9..e950cfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,11 @@ jobs: mysql: image: mysql:8.0.21 ports: - - 3306 + - 3306:3306 env: - MYSQL_ALLOW_EMPTY_PASSWORD: true + MYSQL_ALLOW_EMPTY_PASSWORD: "true" MYSQL_ROOT_PASSWORD: "" + options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 steps: - uses: actions/checkout@v2 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..682dddf --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3.2" + +services: + mysql: + image: mysql:8.0.21 + ports: + - 3306:3306 + environment: + MYSQL_ALLOW_EMPTY_PASSWORD: "true" + MYSQL_ROOT_PASSWORD: "" \ No newline at end of file