-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
74 lines (69 loc) · 1.76 KB
/
docker-compose.yml
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
version: '2'
services:
web:
build:
context: .
dockerfile: Dockerfile
command: ["/bin/sh", "-c", "uvicorn apps.app:app --host 0.0.0.0 --port 8000 --workers 4 --timeout-keep-alive 600"]
ports:
- '8000:8000'
depends_on:
- elasticsearch
- logstash
- db
env_file:
- .env
restart: always
volumes:
- ./logs:/elk-fastapi-app-monitoring/logs
db:
image: postgres
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_PORT: ${DB_PORT}
ports:
- "5432:${DB_PORT}"
restart: always
volumes:
- pg_data:/var/lib/postgresql/data
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.0
environment:
- node.name=elasticsearch
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms256M -Xmx256M"
- http.cors.enabled=true
- http.cors.allow-origin=*
- network.host=_eth0_
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/elasticsearch.yml
ports:
- "9200:9200"
logstash:
image: docker.elastic.co/logstash/logstash:7.6.0
volumes:
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
- ./logstash/pipeline:/usr/share/logstash/pipeline
- ./logs:/usr/share/logstash/logs
ports:
- "5000:5000"
depends_on:
- elasticsearch
kibana:
image: docker.elastic.co/kibana/kibana:7.6.0
ports:
- "5601:5601"
depends_on:
- elasticsearch
volumes:
pg_data:
elasticsearch_data: