Skip to content

Commit 505fa8e

Browse files
authored
[BACKEND] healtychaeck 추가 및 이름 변경 (#80)
1 parent f58fd30 commit 505fa8e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

backend/docker-compose.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ services:
77
- "8080:8080"
88
env_file: ".env" #EC2에 올려둔 .env 사용
99
depends_on:
10-
- mysql
11-
- elasticsearch
10+
elasticsearch:
11+
condition: service_healthy
1212

1313
mysql:
1414
image: mysql:8.0
@@ -24,7 +24,7 @@ services:
2424
volumes:
2525
- mysql_data:/var/lib/mysql
2626

27-
elastic:
27+
elasticsearch:
2828
build:
2929
context: .
3030
dockerfile: Dockerfile.elastic
@@ -36,5 +36,10 @@ services:
3636
- xpack.security.enabled=false
3737
- xpack.security.http.ssl.enabled=false
3838
- ES_JAVA_OPTS=-Xms256m -Xmx256m
39+
healthcheck:
40+
test: ["CMD-SHELL", "curl -f http://localhost:9200 || exit 1"]
41+
interval: 10s
42+
timeout: 5s
43+
retries: 5
3944
volumes:
40-
mysql_data:
45+
mysql_data:

0 commit comments

Comments
 (0)