From 58832859bb0e38bca3e73ddd06ee72cca2344e73 Mon Sep 17 00:00:00 2001 From: Jaeho Yoo Date: Mon, 25 Sep 2023 02:43:54 +0900 Subject: [PATCH] Improve development environment configs --- localdev/docker-compose.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/localdev/docker-compose.yml b/localdev/docker-compose.yml index f8728a1cc..e6ccdfe17 100644 --- a/localdev/docker-compose.yml +++ b/localdev/docker-compose.yml @@ -1,14 +1,16 @@ -version: "3.3" +version: "3.4" services: mysqldb: environment: - MYSQL_ROOT_PASSWORD=root123 - MYSQL_DATABASE=trinogateway - image: mysql:5.5 + image: mysql:5.7 + platform: linux/amd64 ports: - "3306:3306" healthcheck: - test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] + # Need root password to check MySQL server status + test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-proot123"] start_period: 20s timeout: 5s retries: 5 @@ -30,7 +32,8 @@ services: ports: - "5432:5432" healthcheck: - test: ["CMD-SHELL", "pg_isready || exit 1"] + # Need user and database name to check PostgreSQL server status + test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB || exit 1"] interval: 10s timeout: 3s retries: 3