Skip to content

Commit 7d7e0ec

Browse files
committed
[fix] dockerfile 업데이트
1 parent 8126533 commit 7d7e0ec

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/test-elasticsearch.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ jobs:
100100
run: |
101101
echo "Waiting for test Elasticsearch to start..."
102102
for i in {1..30}; do
103-
if curl -s http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=1s | grep -q "yellow\|green"; then
104-
echo "Test Elasticsearch is ready and healthy!"
105-
echo "Elasticsearch status:"
103+
HEALTH_STATUS=$(curl -s http://localhost:9200/_cluster/health | jq -r '.status' 2>/dev/null || echo "down")
104+
if [ "$HEALTH_STATUS" = "green" ] || [ "$HEALTH_STATUS" = "yellow" ]; then
105+
echo "✅ Test Elasticsearch is ready and healthy! Status: $HEALTH_STATUS"
106106
curl -s http://localhost:9200/_cluster/health | jq .
107107
break
108108
fi
109-
echo "Waiting... ($i/30)"
109+
echo "Waiting... ($i/30) - Current status: $HEALTH_STATUS"
110110
sleep 5
111111
done
112112

Dockerfile.elasticsearch

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
FROM docker.elastic.co/elasticsearch/elasticsearch:9.0.2
22

33
# nori 플러그인 설치
4-
RUN elasticsearch-plugin install --batch analysis-nori
4+
RUN elasticsearch-plugin install --batch analysis-nori
5+
6+
7+
# Elasticsearch 설정 파일 수정
8+
RUN echo "network.host: 0.0.0.0" >> /usr/share/elasticsearch/config/elasticsearch.yml && \
9+
echo "discovery.type: single-node" >> /usr/share/elasticsearch/config/elasticsearch.yml && \
10+
echo "xpack.security.enabled: false" >> /usr/share/elasticsearch/config/elasticsearch.yml

0 commit comments

Comments
 (0)