forked from safernandez666/Kong-API-Manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
202 lines (187 loc) · 4.85 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
version: '3'
services:
api:
build: api/.
container_name: api
environment:
DATABASE: "db"
links:
- db
restart: always
ports:
- "5000:5000"
db:
image: mysql:5.7
container_name: db
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: maradona
MYSQL_USER: maradona
MYSQL_PASSWORD:
ports:
- "3306:3306"
volumes:
- dbdata:/var/lib/mysql
- ./db/maradona.sql:/docker-entrypoint-initdb.d/init.sql
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
kong-database:
image: postgres:9.6
container_name: kong-database
environment:
- POSTGRES_USER=kong
- POSTGRES_DB=kong
- POSTGRES_PASSWORD=kong
volumes:
- pg_data:/var/lib/postgresql/data
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U kong"]
interval: 30s
timeout: 10s
retries: 5
migrations:
depends_on:
- kong-database
image: kong
container_name: kong-migrations
environment:
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
- KONG_PG_DATABASE=kong
- KONG_PG_USER=kong
- KONG_PG_PASSWORD=kong
command: kong migrations bootstrap -v
kong:
depends_on:
- kong-database
image: kong
ports:
- 8000:8000
- 443:8443
- 8001:8001
container_name: kong
restart: always
environment:
- TZ=America/Buenos_Aires
- KONG_DATABASE=postgres
- KONG_PG_HOST=kong-database
- KONG_PG_DATABASE=kong
- KONG_PG_USER=kong
- KONG_PG_PASSWORD=kong
- KONG_ADMIN_LISTEN=0.0.0.0:8001
- KONG_PROXY_LISTEN=0.0.0.0:8000, 0.0.0.0:8443 ssl http2
- KONG_NGINX_HTTP_RESOLVER=8.8.8.8
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_TRUSTED_IPS=0.0.0.0/0,::/0
- KONG_REAL_IP_RECURSIVE=on
healthcheck:
test: ["CMD", "wget", "-O-", "http://kong:8001/status"]
interval: 30s
timeout: 20s
retries: 5
mongo:
image: mongo:4.2.2-bionic
container_name: mongo
ports:
- 27017:27017
healthcheck:
test: echo 'db.stats().ok' | mongo localhost:27017/konga --quiet
interval: 30s
timeout: 5s
retries: 5
volumes:
- konga_data:/data/db
konga:
image: pantsel/konga:latest
ports:
- 1337:1337
environment:
DB_ADAPTER: mongo
DB_DATABASE: konga
DB_HOST: mongo
DB_PORT: 27017
KONGA_SEED_USER_DATA_SOURCE_FILE: /kus.js
NODE_ENV: production
volumes:
- ./kus.js:/kus.js:ro
restart: on-failure
prometheus:
image: prom/prometheus
ports:
- 9090:9090
container_name: prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
restart: always
node_exporter:
image: prom/node-exporter:latest
ports:
- 9100:9100
container_name: node_exporter
restart: always
depends_on:
- prometheus
grafana:
container_name: grafana
image: grafana/grafana
ports:
- 3000:3000
container_name: grafana
restart: always
links:
- prometheus:prometheus
environment:
GF_INSTALL_PLUGINS: grafana-clock-panel, grafana-simple-json-datasource
depends_on:
- prometheus
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
volumes:
- es_data:/usr/share/elasticsearch/data
graylog:
container_name: graylog
image: graylog/graylog:4.0
environment:
- TZ=America/Argentina/Buenos_Aires
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
- GRAYLOG_TIMEZONE=America/Argentina/Buenos_Aires
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
- GRAYLOG_MONGODB_URI=mongodb://mongo/graylog
- GRAYLOG_MONGODB_MAX_CONNECTIONS=100
- GRAYLOG_MONGODB_THREADS_ALLOWED_TO_BLOCK_MULTIPLIER=5
entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
restart: always
depends_on:
- mongo
- elasticsearch
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 1514:1514
# Syslog UDP
- 1514:1514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp
volumes:
- graylog_data:/usr/share/graylog/data
- ./plugin:/usr/share/graylog/plugin
- ./config/graylog.conf:/usr/share/graylog/data/config/graylog.conf:ro
volumes:
konga_data:
pg_data:
dbdata:
es_data:
graylog_data: