-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
216 lines (203 loc) · 5.75 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
version: '3'
services:
traefik:
image: traefik:1.6.2
ports:
- 80:80
- 443:443
networks:
- web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${TRAEFIK_TOML_FILE:-./traefik/traefik.toml}:/traefik.toml
#- ${ACME_JSON:-./traefik/acme.json}:/acme.json
labels:
- "traefik.enable=true"
- "traefik.port=8080"
- ${TRAEFIK_URL_CONFIG:-traefik.frontend.rule=Host:traefik.docker.localhost}
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
environment:
# so support single node development
discovery.type: single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
networks:
- web
- default
labels:
- "traefik.backend=naturalis-elasticsearch"
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.port=9200"
- ${ELASTICSEARCH_URL_CONFIG:-traefik.frontend.rule=Host:elasticsearch.docker.localhost}
- ${ELASTICSEARCH_AUTH:-traefik.frontend.auth.basic=kibana:$apr1$.lcgllId$9sUY3fPk/gDuh3NQ55024/}
logstash:
build: ./logstash
volumes:
- ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml
- ./logstash/pipeline:/usr/share/logstash/pipeline
- mysqllog:/mnt/data:rw
ports:
- "5000"
environment:
LS_JAVA_OPTS: "-Xmx256m -Xms256m"
networks:
- default
depends_on:
- elasticsearch
kibana:
image: docker.elastic.co/kibana/kibana-oss:6.2.4
# ports, comment to use traefik only
ports:
- 5601:5601
expose:
- "5601"
networks:
- web
- default
labels:
- "traefik.backend=naturalis-kibana"
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.port=5601"
- ${KIBANA_URL_CONFIG:-traefik.frontend.rule=Host:kibana.docker.localhost}
- ${KIBANA_AUTH:-traefik.frontend.auth.basic=admin:$apr1$LYKt7KdG$E49juU2GNNCE.23VscQ.P0}
grafana:
image: grafana/grafana:5.1.3
volumes:
- grafana_data:/var/lib/grafana
environment:
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASS:-secret}
# ports, comment to use traefik only
ports:
- 3000:3000
expose:
- "3000"
networks:
- web
- default
labels:
- "traefik.backend=naturalis-grafana"
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.port=3000"
- ${GRAFANA_URL_CONFIG:-traefik.frontend.rule=Host:grafana.docker.localhost}
mysql:
build:
context: ./mysql
args:
MYSQL_VERSION: ${MYSQL_VERSION}
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d
- ./mysql/scripts:/scripts
environment:
MYSQL_VERSION: ${MYSQL_VERSION}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
#MYSQL_DATABASE: ${MYSQL_DATABASE}
#MYSQL_USER: ${MYSQL_USER}
#MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- 3306:3306
networks:
- default
mysqlsh:
build: ./mysqlsh
tty: true
volumes:
- mysqllog:/tmp
- ./mysqlsh/scripts:/scripts
environment:
#MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
#MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_HOST: ${MYSQL_HOST}
MYSQL_ANALYTICS_USER: ${MYSQL_ANALYTICS_USER}
MYSQL_ANALYTICS_PASSWORD: ${MYSQL_ANALYTICS_PASSWORD}
networks:
- default
phpmyadmin:
build: ./phpmyadmin
volumes:
- /sessions
# ports, comment to use traefik only
ports:
- 8090:80
expose:
- "80"
networks:
- web
- default
environment:
- PMA_ARBITRARY=1
- PMA_HOST=${MYSQL_HOST}
- PMA_PORT=${MYSQL_PORT}
- PMA_USER=${MYSQL_ANALYTICS_USER}
- PMA_PASSWORD=${MYSQL_ANALYTICS_PASSWORD}
labels:
- "traefik.backend=naturalis-phpmyadmin"
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.port=80"
- ${PHPMYADMIN_URL_CONFIG:-traefik.frontend.rule=Host:phpmyadmin.docker.localhost}
- ${PHPMYADMIN_AUTH:-traefik.frontend.auth.basic=admin:$apr1$LYKt7KdG$E49juU2GNNCE.23VscQ.P0}
schemaspy_nginx:
image: nginx:1.13.1-alpine
volumes:
- schemaspy_data:/var/www/html:ro
- ./schemaspy_nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
expose:
- "80"
networks:
- web
command: "nginx -g 'daemon off;'"
labels:
- "traefik.backend=naturalis-schemaspy"
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.port=80"
- ${SCHEMASPY_URL_CONFIG:-traefik.frontend.rule=Host:schemaspy.docker.localhost}
- ${SCHEMASPY_AUTH:-traefik.frontend.auth.basic=admin:$apr1$LYKt7KdG$E49juU2GNNCE.23VscQ.P0}
schemaspy:
image: schemaspy/schemaspy:snapshot
volumes:
- schemaspy_data:/output
networks:
- default
command: "-t mysql -host ${MYSQL_HOST} -port ${MYSQL_PORT} -db ${MYSQL_SCHEMA} -s ${MYSQL_SCHEMA} -u ${MYSQL_ANALYTICS_USER} -p ${MYSQL_ANALYTICS_PASSWORD}"
sqlpad:
image: 'sqlpad/sqlpad:latest'
hostname: 'sqlpad'
ports:
- '3030:3000'
networks:
- web
- default
environment:
- SQLPAD_DEBUG=TRUE
volumes:
- sqlpad:/var/lib/sqlpad
labels:
- "traefik.backend=naturalis-sqlpad"
- "traefik.docker.network=web"
- "traefik.enable=true"
- "traefik.port=3000"
- ${SQLPAD_URL_CONFIG:-traefik.frontend.rule=Host:sqlpad.docker.localhost}
# - ${SQLPAD_AUTH:-traefik.frontend.auth.basic=admin:$apr1$LYKt7KdG$E49juU2GNNCE.23VscQ.P0}
networks:
web:
external: true
volumes:
mysqldata:
mysqllog:
mariadbdata:
mariadblog:
elasticsearch_data:
schemaspydata:
grafana_data:
schemaspy_data:
sqlpad: