-
Notifications
You must be signed in to change notification settings - Fork 241
/
Copy pathdocker-compose.yaml
117 lines (108 loc) · 3.54 KB
/
docker-compose.yaml
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
name: opik
services:
mysql:
image: mysql:8.4.2
hostname: mysql
environment:
MYSQL_ROOT_PASSWORD: opik
MYSQL_DATABASE: opik
MYSQL_USER: opik
MYSQL_PASSWORD: opik
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent" ]
timeout: 1s
interval: 1s
retries: 300
volumes:
- mysql:/var/lib/mysql/:type=volume,source=~/opik/mysql
redis:
image: redis:7.2.4-alpine3.19
hostname: redis
command: redis-server --requirepass opik
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "6379" ]
interval: 2s
timeout: 4s
retries: 20
start_period: 30s
clickhouse:
image: clickhouse/clickhouse-server:24.3.6.48-alpine
hostname: clickhouse
environment:
CLICKHOUSE_DB: opik
CLICKHOUSE_USER: opik
CLICKHOUSE_PASSWORD: opik
# Enables SQL-driven Access Control and Account Management:
# https://clickhouse.com/docs/en/operations/access-rights#enabling-access-control
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
volumes:
- clickhouse:/var/lib/clickhouse/:type=volume,source=~/opik/clickhouse/data
- clickhouse-server:/var/log/clickhouse-server/:type=volume,source=~/opik/clickhouse/logs
healthcheck:
test: [ "CMD", "wget", "--spider", "-q", "http://127.0.0.1:8123/ping" ]
interval: 1s
timeout: 1s
retries: 300
backend:
image: ghcr.io/comet-ml/opik/opik-backend:${OPIK_VERSION:-latest}
build:
context: ../../apps/opik-backend
dockerfile: Dockerfile
args:
OPIK_VERSION: ${OPIK_VERSION:-latest}
hostname: backend
command: [ "bash", "-c", "./run_db_migrations.sh && ./entrypoint.sh" ]
environment:
DOCKER_BUILDKIT: 1
STATE_DB_PROTOCOL: "jdbc:mysql://"
STATE_DB_URL: "mysql:3306/opik?createDatabaseIfNotExist=true&rewriteBatchedStatements=true"
STATE_DB_DATABASE_NAME: opik
STATE_DB_USER: opik
STATE_DB_PASS: opik
ANALYTICS_DB_MIGRATIONS_URL: "jdbc:clickhouse://clickhouse:8123"
ANALYTICS_DB_MIGRATIONS_USER: opik
ANALYTICS_DB_MIGRATIONS_PASS: opik
ANALYTICS_DB_PROTOCOL: "HTTP"
ANALYTICS_DB_HOST: "clickhouse"
ANALYTICS_DB_PORT: 8123
ANALYTICS_DB_USERNAME: opik
ANALYTICS_DB_DATABASE_NAME: opik
JAVA_OPTS: "-Dliquibase.propertySubstitutionEnabled=true"
REDIS_URL: redis://:opik@redis:6379/
ANALYTICS_DB_PASS: opik
OPIK_OTEL_SDK_ENABLED: false
OTEL_VERSION: 2.9.0
OTEL_PROPAGATORS: "tracecontext,baggage,b3"
OTEL_EXPERIMENTAL_EXPORTER_OTLP_RETRY_ENABLED: true
OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: BASE2_EXPONENTIAL_BUCKET_HISTOGRAM
OTEL_EXPERIMENTAL_RESOURCE_DISABLED_KEYS: process.command_args
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: delta
OPIK_USAGE_REPORT_ENABLED: ${OPIK_USAGE_REPORT_ENABLED:-true}
ports:
- "3003" # OpenAPI specification port
depends_on:
mysql:
condition: service_healthy
clickhouse:
condition: service_healthy
frontend:
image: ghcr.io/comet-ml/opik/opik-frontend:${OPIK_VERSION:-latest}
build:
context: ../../apps/opik-frontend
dockerfile: Dockerfile
hostname: frontend
ports:
- "5173:5173" # Frontend server port
extra_hosts:
- "apihost:host-gateway"
volumes:
- ./nginx_default_local.conf:/etc/nginx/conf.d/default.conf
depends_on:
backend:
condition: service_started
networks:
default:
volumes:
clickhouse:
clickhouse-server:
mysql: