Skip to content

Commit 901cf3d

Browse files
committed
Add compose file for running both ES and ktor in docker
1 parent bdd6cc1 commit 901cf3d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docker-compose-deploy.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: jz-history
2+
3+
services:
4+
elasticsearch:
5+
ports:
6+
- "9200:9200"
7+
container_name: elasticsearch
8+
environment:
9+
- ELASTIC_PASSWORD=elastic
10+
- discovery.type=single-node
11+
- xpack.security.http.ssl.enabled=false
12+
- xpack.license.self_generated.type=trial
13+
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.1
14+
networks:
15+
- history
16+
healthcheck:
17+
test: curl -s http://localhost:9200 | grep -q 'missing authentication credentials'
18+
interval: 10s
19+
timeout: 10s
20+
retries: 120
21+
22+
ktor:
23+
build: .
24+
ports:
25+
- "18181:8080"
26+
container_name: history
27+
environment:
28+
- ELASTIC_HOST=elasticsearch
29+
- ELASTIC_PASSWORD=elastic
30+
image: jzhistory:latest
31+
networks:
32+
- history
33+
depends_on:
34+
elasticsearch:
35+
condition: service_healthy
36+
37+
networks:
38+
history:
39+
name: history_network

0 commit comments

Comments
 (0)