Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding MindsDB - WIP #3699

Merged
merged 6 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions public/svgs/mindsdb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 36 additions & 26 deletions templates/compose/grafana-with-postgresql.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,49 @@
# documentation: https://grafana.com
# slogan: Grafana is the open source analytics & monitoring solution for every database.
# tags: grafana,analytics,monitoring,dashboard
# logo: svgs/grafana.svg
# port: 3000


# documentation: https://docs.mindsdb.com/what-is-mindsdb
# slogan: MindsDB is the platform for building AI from enterprise data, enabling smarter organizations.
# tags: mysql, postgresdb, machine-learning, ai
# logo: svgs/mindsdb.png
# port: 47334

services:
grafana:
image: grafana/grafana-oss
mindsdb:
image: mindsdb/mindsdb
restart: always
container_name: mindsdb
environment:
- SERVICE_FQDN_GRAFANA_3000
- GF_SERVER_ROOT_URL=${SERVICE_FQDN_GRAFANA}
- GF_SERVER_DOMAIN=${SERVICE_FQDN_GRAFANA}
- GF_SECURITY_ADMIN_PASSWORD=${SERVICE_PASSWORD_GRAFANA}
- GF_DATABASE_TYPE=postgres
- GF_DATABASE_HOST=postgresql
- GF_DATABASE_USER=$SERVICE_USER_POSTGRES
- GF_DATABASE_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- GF_DATABASE_NAME=${POSTGRES_DB:-grafana}
- SERVICE_FQDN_MINDSDB_47334
- SERVICE_FQDN_API_47335=/api
- MINDSDB_DOCKER_ENV=true
- MINDSDB_STORAGE_DIR=/mindsdb/var
- FLASK_DEBUG=1 # This will make sure http requests are logged regardless of log level
- OPENAI_API_KEY=$OPENAI_API_KEY
- LANGFUSE_HOST=$LANGFUSE_HOST
- LANGFUSE_PUBLIC_KEY=$LANGFUSE_PUBLIC_KEY
- LANGFUSE_SECRET_KEY=$LANGFUSE_SECRET_KEY
- LANGFUSE_RELEASE="local"
# - LANGFUSE_DEBUG="True"
- LANGFUSE_TIMEOUT="10"
- LANGFUSE_SAMPLE_RATE="1.0"
- MINDSDB_DB_CON=postgresql://postgres:postgres@postgresql
# ports:
# - 47335:47335
# - 47336:47336
volumes:
- grafana-data:/var/lib/grafana
- mindsdb-data:/mindsdb/var
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000/api/health"]
interval: 5s
timeout: 20s
retries: 10
depends_on:
- postgresql
test: ["CMD", "curl", "-f", "http://localhost:47334/api/util/ping"]
interval: 30s
timeout: 4s
retries: 100
postgresql:
image: postgres:16-alpine
volumes:
- postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=$SERVICE_USER_POSTGRES
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- POSTGRES_DB=${POSTGRES_DB:-grafana}
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=mindsdb
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
Expand Down
49 changes: 49 additions & 0 deletions templates/compose/mindsdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# documentation: https://docs.mindsdb.com/what-is-mindsdb
# slogan: MindsDB is the platform for building AI from enterprise data, enabling smarter organizations.
# tags: mysql, postgresdb, machine-learning, ai
# logo: svgs/mindsdb.png
# port: 47334

services:
mindsdb:
image: mindsdb/mindsdb
restart: always
container_name: mindsdb
environment:
- SERVICE_FQDN_MINDSDB_47334
- SERVICE_FQDN_API_47335=/api
- MINDSDB_DOCKER_ENV=true
- MINDSDB_STORAGE_DIR=/mindsdb/var
- FLASK_DEBUG=1 # This will make sure http requests are logged regardless of log level
- OPENAI_API_KEY=$OPENAI_API_KEY
- LANGFUSE_HOST=$LANGFUSE_HOST
- LANGFUSE_PUBLIC_KEY=$LANGFUSE_PUBLIC_KEY
- LANGFUSE_SECRET_KEY=$LANGFUSE_SECRET_KEY
- LANGFUSE_RELEASE="local"
# - LANGFUSE_DEBUG="True"
- LANGFUSE_TIMEOUT="10"
- LANGFUSE_SAMPLE_RATE="1.0"
- MINDSDB_DB_CON='postgresql://$SERVICE_USER_POSTGRES:$SERVICE_PASSWORD_POSTGRES@postgresql'
# ports:
# - 47335:47335
# - 47336:47336
volumes:
- mindsdb-data:/mindsdb/var
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:47334/api/util/ping"]
interval: 30s
timeout: 4s
retries: 100
postgresql:
image: postgres:16-alpine
volumes:
- postgresql-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=$SERVICE_USER_POSTGRES
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
- POSTGRES_DB=${POSTGRES_DB:-mindsdb}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 20s
retries: 10