-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcompose.yml
101 lines (101 loc) · 2.8 KB
/
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
name: 'bee-observe'
services:
mongo:
image: mongo:7
ports:
- '${DATABASE_EXPOSED_PORT:-27019}:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME:-mongo}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD:-mongo}
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7
ports:
- '${REDIS_EXPOSED_PORT:-6380}:6379'
command: redis-server --save 20 1 --loglevel warning
healthcheck:
test: ['CMD-SHELL', 'redis-cli ping | grep PONG']
interval: 10s
timeout: 5s
retries: 5
mlflow:
image: bitnami/mlflow:2.17.2
restart: always
ports:
- '${MLFLOW_EXPOSED_PORT:-8080}:8080'
entrypoint:
[
'/bin/bash',
'-c',
'/entrypoint.sh && mlflow server --app-name basic-auth --host 0.0.0.0 --port 8080'
]
security_opt:
- 'label=disable'
volumes:
- ./entrypoint.sh:/entrypoint.sh:ro
wait_for_mlflow:
image: curlimages/curl:latest
depends_on:
mlflow:
condition: service_started
entrypoint:
[
'sh',
'-c',
"while ! curl --silent --fail http://mlflow:8080; do echo 'Waiting for API...'; sleep 5; done"
]
otel-collector:
image: otel/opentelemetry-collector-contrib:0.114.0
restart: always
ports:
- '4318:4318' # OTLP HTTP receiver
- '13133:13133' # Health Check
- '55679:55679' # Prometheus scraping port
command: ['--config=/etc/otel-collector-config.yaml']
volumes:
- ./scripts/open_telemetry_collector/otel-collector-config-docker.yaml:/etc/otel-collector-config.yaml
observe_api:
build:
context: .
args:
GIT_TAG: ${TAG:-testing}
BUILD_DATETIME: ${BUILD_DATETIME:-}
ports:
- '${OBSERVE_API_EXPOSED_PORT:-4319}:4319'
env_file:
- .env.testing.docker
command: >
/bin/sh -c "
touch tsconfig.json &&
NODE_ENV=production npx mikro-orm --config dist/mikro-orm.config.js migration:up &&
node ./dist/index.js
"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://0.0.0.0:4319/health || exit 1
interval: 10s
timeout: 5s
retries: 5
depends_on:
mlflow:
condition: service_started
mongo:
condition: service_healthy
redis:
condition: service_healthy
otel-collector:
condition: service_started
wait_for_api:
image: curlimages/curl:latest
depends_on:
observe_api:
condition: service_healthy
entrypoint:
[
'sh',
'-c',
"while ! curl --silent --fail http://observe_api:4318/health; do echo 'Waiting for API...'; sleep 5; done"
]