-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (99 loc) · 2.62 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
version: '3'
services:
nginx:
image: nginx
container_name: nginx
ports:
- 443:443
volumes:
- ./nginx/conf.d/:/etc/nginx/conf.d
networks:
- elk
depends_on:
- flask
flask:
build:
context: server
dockerfile: Dockerfile
container_name: flask
restart: unless-stopped
environment:
APP_ENV: "prod"
APP_DEBUG: "False"
APP_PORT: 5000
MONGODB_DATABASE: flaskdb
MONGODB_USERNAME: flaskuser
MONGODB_PASSWORD: root
MONGODB_HOSTNAME: mongodb
volumes:
- type: bind
source: ./server/
target: /server/
depends_on:
- mongodb
networks:
- elk
mongodb:
image: mongo:4.4.4
container_name: mongodb
restart: unless-stopped
environment:
MONGO_INITDB_DATABASE: flaskdb
MONGODB_DATA_DIR: /data/db
MONDODB_LOG_DIR: /dev/null
volumes:
- mongodbdata:/data/db
networks:
- elk
elastic:
image: amazon/opendistro-for-elasticsearch:1.13.2
container_name: elastic
environment:
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
volumes:
- elastic-data:/usr/share/elasticsearch/data
- ./elastic_test/internal_users.yml:/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/internal_users.yml
- ./elastic_test/roles_mapping.yml:/usr/share/elasticsearch/plugins/opendistro_security/securityconfig/roles_mapping.yml
ports:
- 9300:9300
- 9600:9600 # required for Performance Analyzer
networks:
- elk
kibana:
image: amazon/opendistro-for-elasticsearch-kibana:1.13.2
container_name: kibana
ports:
- 5601:5601
expose:
- "5601"
environment:
ELASTICSEARCH_URL: https://elastic:9300
ELASTICSEARCH_HOSTS: https://elastic:9300
SERVER_SSL_ENABLED: "true"
SERVER_SSL_KEY: /usr/share/kibana/config/example.com+4-key.pem
SERVER_SSL_CERTIFICATE: /usr/share/kibana/config/example.com+4.pem
volumes:
- ./kibana/example.com+4-key.pem:/usr/share/kibana/config/example.com+4-key.pem
- ./kibana/example.com+4.pem:/usr/share/kibana/config/example.com+4.pem
networks:
- elk
logstash:
image: docker.elastic.co/logstash/logstash-oss:7.10.2
volumes:
- ./logstash/pipeline:/usr/share/logstash/pipeline:ro
ports:
- 5000:5000
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
depends_on:
- elastic
networks:
- elk
networks:
elk:
driver: bridge
volumes:
elastic-data:
driver: local
mongodbdata: