-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
170 lines (159 loc) · 4.4 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
version: "3.1"
services:
translationstation:
build:
context: .
dockerfile: ./build/TranslationStation/Dockerfile
environment:
- ASPNETCORE_URLS=http://+:8080
- ELASTIC_APM_SERVER_URL=http://apm-server:8200
- ELASTIC_APM_SERVICE_NAME=translation-station
- ELASTIC_APM_ENVIRONMENT=local
- GOOGLE_APPLICATION_CREDENTIALS=Google_Creds.json
- SupportedLanguages=[en, es]
depends_on:
elasticsearch:
condition: service_healthy
ports:
- 8888:8080
networks:
- babble
babelfish:
build:
context: .
dockerfile: ./build/babel-fish/Dockerfile
environment:
- ELASTIC_APM_SERVER_URL=http://apm-server:8200
- ELASTIC_APM_SERVICE_NAME=babel-fish
- ELASTIC_APM_ENVIRONMENT=local
depends_on:
- postgresql
ports:
- 8080:8080
networks:
- babble
#ref https://github.com/bitnami/bitnami-docker-postgresql
postgresql:
image: 'bitnami/postgresql:latest'
environment:
- POSTGRESQL_USERNAME=postgres
- POSTGRESQL_PASSWORD=password123
- POSTGRESQL_DATABASE=postgres
ports:
- 5432:5432
# volumes:
# - ./data/postgres:/bitnami/postgresql
networks:
- babble
#ref https://github.com/prometheus-community/postgres_exporter
postgres_exporter:
image: wrouesnel/postgres_exporter
environment:
- DATA_SOURCE_NAME=postgresql://postgres:password123@postgresql:5432/postgres?sslmode=disable
depends_on:
- postgresql
networks:
- babble
# ref: https://www.elastic.co/guide/en/apm/get-started/current/quick-start-overview.html
apm-server:
image: docker.elastic.co/apm/apm-server:7.11.0
depends_on:
elasticsearch:
condition: service_healthy
kibana:
condition: service_healthy
cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"]
cap_drop: ["ALL"]
ports:
- 8200:8200
networks:
- babble
command: >
apm-server -e
-E apm-server.rum.enabled=true
-E setup.kibana.host=kibana:5601
-E setup.template.settings.index.number_of_replicas=0
-E apm-server.kibana.enabled=true
-E apm-server.kibana.host=kibana:5601
-E output.elasticsearch.hosts=["elasticsearch:9200"]
healthcheck:
interval: 10s
retries: 12
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8200/
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.0
environment:
- bootstrap.memory_lock=true
- cluster.name=docker-cluster
- cluster.routing.allocation.disk.threshold_enabled=false
- discovery.type=single-node
- ES_JAVA_OPTS=-XX:UseAVX=2 -Xms1g -Xmx1g
ulimits:
memlock:
hard: -1
soft: -1
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- babble
healthcheck:
interval: 20s
retries: 10
test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'
kibana:
image: docker.elastic.co/kibana/kibana:7.11.0
depends_on:
elasticsearch:
condition: service_healthy
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
ports:
- 5601:5601
networks:
- babble
healthcheck:
interval: 10s
retries: 20
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:5601/api/status
prometheus:
image: prom/prometheus:v2.1.0
volumes:
- ./monitor/prometheus/:/etc/prometheus/
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9090:9090
restart: always
networks:
- babble
grafana:
image: grafana/grafana
user: "472"
depends_on:
- prometheus
ports:
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
- ./monitor/grafana/provisioning/:/etc/grafana/provisioning/
env_file:
- ./monitor/grafana/config.monitoring
restart: always
networks:
- babble
volumes:
grafana_data:
driver: local
esdata:
driver: local
# postgresdata:
# driver: local
networks:
babble:
driver: bridge