-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
120 lines (108 loc) · 2.27 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# THIS IS A LOCAL 'docker-compose' FILE FOR LOCAL BUILDS AND TESTS
version: '3'
services:
postgres:
build: ./Database
container_name: DB-postgres
restart: always
volumes:
- postgres_volume:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 3
networks:
- main
adminer:
image: adminer
container_name: DB-postgres-interface
restart: always
ports:
- 8082:8080
networks:
- main
api:
build: ./Minitwit-api
container_name: API
depends_on:
- postgres
ports:
- 8080:8080
networks:
- main
app:
build: ./ITU_MiniTwit
container_name: APP
command: >
sh -c "
python manage.py runserver 0.0.0.0:8000"
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: DB-postgres
depends_on:
postgres:
condition: service_healthy
ports:
- 8000:8000
links:
- postgres
networks:
- main
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:7.17.1"
environment:
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- "discovery.type=single-node"
volumes:
- elk-elasticsearch-volume:/usr/share/elasticsearch/data
networks:
- elk
kibana:
image: "docker.elastic.co/kibana/kibana:7.17.1"
environment:
elasticsearch.hosts: '["http://elasticsearch:9200"]'
networks:
- elk
filebeat:
build: ./filebeat
volumes:
- /var/lib/docker:/var/lib/docker:ro
- /var/run/docker.sock:/var/run/docker.sock
networks:
- elk
nginx:
build: ./nginx
ports:
- 9200:9200
- 5000:5601
networks:
- elk
prometheus:
build: ./prometheus
container_name: prometheus
volumes:
- prometheus_volume:/prometheus
networks:
- main
grafana:
build: ./grafana
container_name: grafana
volumes:
- grafana_volume:/var/lib/grafana
ports:
- 5003:3000
networks:
- main
volumes:
postgres_volume:
elk-elasticsearch-volume:
prometheus_volume:
grafana_volume:
networks:
main:
name: itu-minitwit-network
elk:
name: elk-network