-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (86 loc) · 2.27 KB
/
docker-compose.yml
File metadata and controls
92 lines (86 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: '3.8'
# LeaksBackend with Elasticsearch and Kibana stack
# This is for testing only, please refer to the README.md for more information.
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
container_name: leaks-elasticsearch
environment:
- node.name=es-node
- cluster.name=leaks-backend-cluster
- discovery.type=single-node
- bootstrap.memory_lock=false
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
- http.cors.enabled=true
- http.cors.allow-origin="*"
- logger.level=WARN
volumes:
- es_data:/usr/share/elasticsearch/data
ports:
- "9200:9200"
networks:
- leaks-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=30s || exit 1"]
interval: 30s
timeout: 30s
retries: 10
start_period: 60s
kibana:
image: docker.elastic.co/kibana/kibana:8.17.0
container_name: leaks-kibana
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- SERVER_NAME=localhost
- SERVER_HOST=0.0.0.0
- SERVER_PORT=5601
- LOGGING_LEVEL=warn
- SERVER_MAXPAYLOAD=1048576
ports:
- "5601:5601"
networks:
- leaks-network
depends_on:
elasticsearch:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5601/api/status || exit 1"]
interval: 30s
timeout: 30s
retries: 5
start_period: 60s
leaks-backend:
build:
context: .
dockerfile: Dockerfile
container_name: leaks-backend-api
env_file:
- .env
environment:
- ELASTIC_URL=http://elasticsearch:9200
ports:
- "8080:8080"
networks:
- leaks-network
depends_on:
elasticsearch:
condition: service_healthy
restart: unless-stopped
volumes:
- ./logs:/app/logs
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
es_data:
driver: local
networks:
leaks-network:
driver: bridge
name: leaks-backend-network