forked from mindsdb/mindsdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
140 lines (130 loc) · 5.05 KB
/
docker-compose.yml
File metadata and controls
140 lines (130 loc) · 5.05 KB
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
services:
# Auto-restarts containers that are unhealthy
autoheal:
container_name: autoheal
image: willfarrell/autoheal
volumes:
- /var/run/docker.sock:/var/run/docker.sock
<<: &autoRestartOnFailure
deploy:
restart_policy:
condition: on-failure
max_attempts: 10
mindsdb:
<<: *autoRestartOnFailure
image: mindsdb/mindsdb:devel
depends_on:
postgres:
condition: service_healthy
# Uncomment the following lines if you want to use the local version of jaeger and langfuse
# jaeger:
# condition: service_started
# langfuse:
# condition: service_started
# If you want to build the image instead:
# build:
# context: .
# dockerfile: docker/mindsdb.Dockerfile
# target: dev # Makes sure dev dependencies are installed
restart: always
ports:
- '47334:47334'
- '47335:47335'
- '47336:47336'
# watchfiles will reload the app when python files are changed
entrypoint: bash -c "watchfiles --filter python 'python -m mindsdb' ."
environment:
MINDSDB_DB_CON: "postgresql://postgres:postgres@postgres/mindsdb"
MINDSDB_DOCKER_ENV: "True"
MINDSDB_STORAGE_DIR: "/mindsdb/var"
FLASK_DEBUG: 1 # This will make sure http requests are logged regardless of log level
SENTRY_IO_DSN: ""
SENTRY_IO_ENVIRONMENT: "local"
# SENTRY_IO_FORCE_RUN: "true" # Uncomment me to force-start sentry on local development. Good for profiling, but may annoy other devs on sentry.io with the "noise"
# MINDSDB_LOG_LEVEL: "DEBUG"
# OPENAI_API_KEY: "..."
LANGFUSE_HOST: "http://langfuse:3000" # Define the host for langfuse
LANGFUSE_PUBLIC_KEY: "pk-lf-1234567890" # Define the public key for langfuse
LANGFUSE_SECRET_KEY: "sk-lf-1234567890" # Define the secret key for langfuse
LANGFUSE_RELEASE: "local"
# LANGFUSE_DEBUG: "True"
LANGFUSE_TIMEOUT: "10"
LANGFUSE_SAMPLE_RATE: "1.0"
OTEL_EXPORTER_TYPE: "console" # or "console" # Define the exporter type (console/otlp)
# OTEL_OTLP_ENDPOINT: "http://jaeger:4317" # Define the endpoint for the otlp exporter. Uncomment this line if you want to use jaeger.
OTEL_SERVICE_NAME: "mindsdb" # Define the service name
OTEL_SERVICE_ENVIRONMENT: "local" # Define the service environment
# OTEL_SDK_FORCE_RUN: "true" # Uncomment me to force-start opentelemetry on local development.
volumes:
- type: bind
source: .
target: /mindsdb
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:47334/api/util/ping"]
interval: 30s
timeout: 4s
retries: 100
jaeger:
<<: *autoRestartOnFailure
image: jaegertracing/all-in-one:1.62.0
ports:
- "16686:16686"
- "4317:4317"
- "4318:4318"
environment:
COLLECTOR_ZIPKIN_HOST_PORT: ":9411"
healthcheck:
test: ["CMD-SHELL", "/go/bin/all-in-one-linux status"]
interval: 3s
timeout: 3s
retries: 10
langfuse:
<<: *autoRestartOnFailure
image: langfuse/langfuse:2.87.0
restart: always
depends_on:
postgres:
condition: service_healthy
ports:
- "3000:3000"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000/api/public/health"]
interval: 3s
timeout: 3s
retries: 10
environment:
- DATABASE_URL=postgresql://postgres:postgres@postgres/langfuse
- NEXTAUTH_SECRET=secret # generate secret with at least 256 entropy using `openssl rand -base64 32`.
- SALT=salt # generate secret with at least 256 entropy using `openssl rand -base64 32`.
- ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000 # generate secret with at least 256 bits and 64 characters in hex format using `openssl rand -hex 32`.
- NEXTAUTH_URL=http://localhost:3000 # URL of the frontend
- LANGFUSE_INIT_ORG_ID=mindsdb # Organization ID
- LANGFUSE_INIT_ORG_NAME=MindsDB # Organization name
- LANGFUSE_INIT_PROJECT_ID=23152f1d-9604-4629-a69d-27790d47b7fa # Project ID (UUID)
- LANGFUSE_INIT_PROJECT_NAME=MindsDB # Project name
- LANGFUSE_INIT_PROJECT_PUBLIC_KEY=pk-lf-1234567890 # Project public key
- LANGFUSE_INIT_PROJECT_SECRET_KEY=sk-lf-1234567890 # Project secret key
- LANGFUSE_INIT_USER_EMAIL=admin@langfuse.com # User email
- LANGFUSE_INIT_USER_NAME=User # User name
- LANGFUSE_INIT_USER_PASSWORD=password # User password
postgres:
<<: *autoRestartOnFailure
image: postgres:16.4
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 3s
retries: 10
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "15432:5432" # Expose the port to the host. Use 15432 to avoid conflicts with local postgres installations
volumes:
- db_data:/var/lib/postgresql/data
- ./scripts/init-dbs.sh:/docker-entrypoint-initdb.d/init-dbs.sh
volumes:
db_data:
driver: local