-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
276 lines (227 loc) · 9.99 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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# Elasticsearch require : sudo sysctl -w vm.max_map_count=26214 (or update of /etc/sysctl.conf)
version: '2.1'
services:
myrtea-postgresql:
network_mode: host
image: postgres:11-alpine
container_name: myrtea-demo-postgresql
ports:
- 5432:5432
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
## CONFIG
- ./postgres/db.sql:/docker-entrypoint-initdb.d/db.sql
myrtea-elasticsearch:
network_mode: host
image: docker.elastic.co/elasticsearch/elasticsearch:6.7.0
container_name: myrtea-demo-elasticsearch
environment:
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
- 9300:9300
myrtea-kibana:
network_mode: host
image: docker.elastic.co/kibana/kibana:6.7.0
container_name: myrtea-demo-kibana
environment:
- ELASTICSEARCH_HOSTS=http://localhost:9200
ports:
- 5601:5601
wait:
image: dokku/wait
depends_on:
- myrtea-postgresql
- myrtea-elasticsearch
- myrtea-kibana
myrtea-ingester-api:
network_mode: host
image: docker.pkg.github.com/myrteametrics/myrtea-ingester-api/myrtea-ingester-api:demo
container_name: myrtea-demo-ingester-api
ports:
- 9001:9001
depends_on:
- wait
environment:
# Enable or disable debug mode
# Debug mode print all configuration variables when the binary start
# WARNING: every single variable will be printed, including password or sensitive data
# Default value: "false"
MYRTEA_DEBUG_MODE: "false"
# Specify the server running port. API (including swagger) will be reachable through this port
# Default value: "9001"
MYRTEA_SERVER_PORT: "9001"
# Enable or disable TLS and HTTPS server security (false = HTTPS / true = HTTP)
# If SERVER_ENABLE_TLS = true, SERVER_SSL_FILE_CRT and SERVER_SSL_FILE_KEY must be specified
# Default value: "false"
MYRTEA_SERVER_ENABLE_TLS: "false"
# TLS certificate file path
# Default value: "certs/server.rsa.crt"
MYRTEA_SERVER_TLS_FILE_CRT: "certs/server.rsa.crt"
# TLS private key file path
# Default value: "certs/server.rsa.key"
MYRTEA_SERVER_TLS_FILE_KEY: "certs/server.rsa.key"
# Enable or Disable CORS policy on the API
# See https://enable-cors.org/
# Default value: "false"
MYRTEA_API_ENABLE_CORS: "true"
# Enable or Disable API security
# If unsecured = false, a valid JWT (JSON Web Token) is required to access the API
# This JWT is delivered using the /login endpoint (which required a login and a password)
# If API_ENABLE_SECURITY = false, no JWT is required and all endpoints can be called freely
# Default value: "true"
MYRTEA_API_ENABLE_SECURITY: "false"
# Enable or Disable API Gateway mode
# If API_ENABLE_GATEWAY_MODE = true, the API will still required a JWT but no validation will be done on this JWT
# Be aware that in gateway mode, every JWT MUST have been validated by another layer of security (in this case, an API Gateway using the auth-api)
# The auth-api will be responsible to deliver the tokens (/login) and to validate the tokens (/validate)
# Default value: "false"
MYRTEA_API_ENABLE_GATEWAY_MODE: "true"
# Specify the instance name
# The instance name must be the same in every components in the stack to ensure proper working conditions
# Default value: "myrtea"
MYRTEA_INSTANCE_NAME: "myrtea"
# Specify the hostname used to access the swagger UI
# If not set (or incorrect), the swagger UI will be available but will not be usable (using execute on endpoints)
# Default value: "localhost:9001"
MYRTEA_SWAGGER_HOST: "localhost:9001"
# Specify the elasticsearch URLS
# Array of URLS might not work using environment variable (should be fixed soon)
# Default value: "http://localhost:9200"
MYRTEA_ELASTICSEARCH_URLS: "http://localhost:9200"
# Specify the maximum number of concurrent worker by type of ingested document (1 type of document = n workers)
# Default value: 2
MYRTEA_INGESTER_MAXIMUM_WORKERS: "2"
# Specify the workers maximum buffer size before document flushing to elasticsearch
# Default value: 2000
MYRTEA_WORKER_MAXIMUM_BUFFER_SIZE: "2000"
# Specify the timeout before document flushing to elasticsearch (in seconds)
# Default value: 10
MYRTEA_WORKER_FORCE_FLUSH_TIMEOUT_SEC: "10"
# Enable dry run mode for elasticsearch
# If DEBUG_DRY_RUN_ELASTICSEARCH = true, no interaction will be done with elasticsearch (no enrichment and no document post)
# Default value: false
MYRTEA_DEBUG_DRY_RUN_ELASTICSEARCH: "false"
myrtea-engine-api:
network_mode: host
image: docker.pkg.github.com/myrteametrics/myrtea-ingester-api/myrtea-engine-api:demo
container_name: myrtea-demo-engine-api
ports:
- 9000:9000
depends_on:
- wait
environment:
# Enable or disable debug mode
# Debug mode print all configuration variables when the binary start
# WARNING: every single variable will be printed, including password or sensitive data
# Default value: "false"
MYRTEA_DEBUG_MODE: "false"
# Specify the server running port. API (including swagger) will be reachable through this port
# Default value: "9000"
MYRTEA_SERVER_PORT: "9000"
# Enable or disable TLS and HTTPS server security (false = HTTPS / true = HTTP)
# If SERVER_ENABLE_TLS = true, SERVER_SSL_FILE_CRT and SERVER_SSL_FILE_KEY must be specified
# Default value: "false"
MYRTEA_SERVER_ENABLE_TLS: "false"
# TLS certificate file path
# Default value: "certs/server.rsa.crt"
MYRTEA_SERVER_TLS_FILE_CRT: "certs/server.rsa.crt"
# TLS private key file path
# Default value: "certs/server.rsa.key"
MYRTEA_SERVER_TLS_FILE_KEY: "certs/server.rsa.key"
# Enable or Disable CORS policy on the API
# See https://enable-cors.org/
# Default value: "false"
MYRTEA_API_ENABLE_CORS: "true"
# Enable or Disable API security
# If unsecured = false, a valid JWT (JSON Web Token) is required to access the API
# This JWT is delivered using the /login endpoint (which required a login and a password)
# If API_ENABLE_SECURITY = false, no JWT is required and all endpoints can be called freely
# Default value: "true"
MYRTEA_API_ENABLE_SECURITY: "true"
# Enable or Disable API Gateway mode
# If API_ENABLE_GATEWAY_MODE = true, the API will still required a JWT but no validation will be done on this JWT
# Be aware that in gateway mode, every JWT MUST have been validated by another layer of security (in this case, an API Gateway using the auth-api)
# The auth-api will be responsible to deliver the tokens (/login) and to validate the tokens (/validate)
# Default value: "false"
MYRTEA_API_ENABLE_GATEWAY_MODE: "true"
# Specify the instance name
# The instance name must be the same in every components in the stack to ensure proper working conditions
# Default value: "myrtea"
MYRTEA_INSTANCE_NAME: "myrtea"
# Specify the hostname used to access the swagger UI
# If not set (or incorrect), the swagger UI will be available but will not be usable (using execute on endpoints)
# Default value: "localhost:9000"
MYRTEA_SWAGGER_HOST: "localhost:9000"
# Specify the elasticsearch URLS
# Array of URLS might not work using environment variable (should be fixed soon)
# Default value: "http://localhost:9200"
MYRTEA_ELASTICSEARCH_URLS: "http://localhost:9200"
# Specify the postgresql host name
# Default value: "localhost"
#MYRTEA_POSTGRESQL_HOSTNAME: "myrtea-v4-${MYRTEA_ENV}-postgresql"
MYRTEA_POSTGRESQL_HOSTNAME: localhost
# Specify the postgresql port
# Default value: "5432"
MYRTEA_POSTGRESQL_PORT: "5432"
# Specify the postgresql database name
# Default value: "postgres"
MYRTEA_POSTGRESQL_DBNAME: "postgres"
# Specify the postgresql user name
# Default value: "postgres"
MYRTEA_POSTGRESQL_USERNAME: "postgres"
# Specify the postgresql user password
# Default value: "postgres"
MYRTEA_POSTGRESQL_PASSWORD: "postgres"
# Specify the postgresql connection pool maximum open connection
# Default value: "6"
MYRTEA_POSTGRESQL_CONN_POOL_MAX_OPEN: "6"
# Specify the postgresql connection pool maximum idle connection
# Default value: "3"
MYRTEA_POSTGRESQL_CONN_POOL_MAX_IDLE: "3"
# Specify the postgresql connection pool maximum idle connection
# Expressed as a Golang duration
# Default value: "0"
MYRTEA_POSTGRESQL_CONN_MAX_LIFETIME: "0"
# Enable or disable crons automation on API start
# Warning: Keep this parameter to "true" in production to ensure proper rotation even after a restart
# Default value: "true"
MYRTEA_ENABLE_CRONS_ON_START: "true"
myrtea-web-interface:
network_mode: host
image: docker.pkg.github.com/myrteametrics/myrtea-settings-webapp/myrtea-settings-webapp:demo
container_name: myrtea-demo-web-interface
ports:
- 8080:8080
volumes:
- ./web-interface/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- wait
myrtea-connector:
network_mode: host
image: docker.pkg.github.com/myrteametrics/myrtea-weather-demo/myrtea-weather-connector:demo
container_name: myrtea-demo-weather-connector
depends_on:
- wait
myrtea-grafana:
network_mode: host
image: grafana/grafana
container_name: myrtea-demo-grafana
ports:
- 3000:3000
depends_on:
- wait
environment:
GF_AUTH_DISABLE_LOGIN_FORM: "true"
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
volumes:
## CONFIG
- ./grafana/provisioning:/etc/grafana/provisioning