mirror of
https://github.com/Canner/WrenAI.git
synced 2026-09-24 23:29:49 +08:00
* Chore: integrate with ibis server (#306) * feat: Add ibis adaptor for querying supported data sources * feat: Add testIbis resolver for querying supported data sources * feat: use queryService for preview and describe statement * feat: Refactor ibisAdaptor to use DataSourceName enum consistently * test ibis using tpch query * rm test ibis * feat: Add previewSql resolver for SQL preview * rm debug log * use projectId and manifest to generate hash Implement getMDL api * pass mdl to ibis server to preview * transform manifest data type to json object when retrieved from database * better error message from Ibis server, rewrite host when development and using docker * use base64 str to transfer mdl * update README * change env name to fit naming style. update docker-compose.x.yaml and .env.example file * fix yarn build issue * update docker-compose file: fix incorrent ibis server endpoint * port forward to ibis server * fix incorrect migration rollback function * update engine version * Chore: refactor database schema to reflect how we use them. (#341) * add connectionInfo column and do data migration * drop deprecated columns that store connection info, use connectionInfo column instead * do data migration to store tableReference in model's properties * fix incorrect migration rollback function * use tableReference in mdl instead of refSql * chore: Update variable names in ibisAdaptor and queryService * chore: Update variable names in ibisAdaptor and queryService * fix lint * rename variable in ibis adaptor * - remove duplicate logic to parse string - add comment * release 0.4.0-rc.1 (#378) * fix: fix nested resolver to format sql (#379) * feat(wren-ui): Provide limit property in preview data API for excel-add-in used (#373) * fix(wren-ui): add displayName to all view API which share ViewInfo type in graphQL * feat(wren-ui): provide limit property of preview API for usage in excel-add-in * Chore: minimized the diversity of data sources from wren-ui (#384) * chore: Update ibisAdaptor to include methods for getting tables and constraints * remove strategies and connectors from codebase, use ibis server and wrenEngine to fetch metadata of data source * add validation rule api in ibisAdapter * replace invalid char when generating referenceName * fix comments * Feature: support dry run in preview API (#402) * can dry-run with previewSql * update env.example and docker-compose-dev.yaml --------- Co-authored-by: Shimin <andreashimin@gmail.com>
136 lines
3.6 KiB
YAML
136 lines
3.6 KiB
YAML
version: "3"
|
|
|
|
volumes:
|
|
data:
|
|
|
|
networks:
|
|
wren:
|
|
driver: bridge
|
|
|
|
services:
|
|
bootstrap:
|
|
image: ghcr.io/canner/wren-bootstrap:${WREN_BOOTSTRAP_VERSION}
|
|
restart: on-failure
|
|
platform: ${PLATFORM}
|
|
environment:
|
|
DATA_PATH: /app/data
|
|
PG_USERNAME: ${PG_USERNAME}
|
|
PG_PASSWORD: ${PG_PASSWORD}
|
|
volumes:
|
|
- data:/app/data
|
|
command: /bin/sh /app/init.sh
|
|
|
|
wren-engine:
|
|
image: ghcr.io/canner/wren-engine:${WREN_ENGINE_VERSION}
|
|
restart: on-failure
|
|
platform: ${PLATFORM}
|
|
expose:
|
|
- ${WREN_ENGINE_PORT}
|
|
- ${WREN_ENGINE_SQL_PORT}
|
|
volumes:
|
|
- data:/usr/src/app/etc
|
|
networks:
|
|
- wren
|
|
depends_on:
|
|
- bootstrap
|
|
|
|
ibis-server:
|
|
image: ghcr.io/canner/wren-engine-ibis:${IBIS_SERVER_VERSION}
|
|
restart: on-failure
|
|
platform: ${PLATFORM}
|
|
expose:
|
|
- ${IBIS_SERVER_PORT}
|
|
environment:
|
|
WREN_ENGINE_ENDPOINT: http://wren-engine:${WREN_ENGINE_PORT}
|
|
networks:
|
|
- wren
|
|
|
|
wren-ai-service:
|
|
image: ghcr.io/canner/wren-ai-service:${WREN_AI_SERVICE_VERSION}
|
|
restart: on-failure
|
|
platform: ${PLATFORM}
|
|
expose:
|
|
- ${WREN_AI_SERVICE_PORT}
|
|
ports:
|
|
- ${AI_SERVICE_FORWARD_PORT}:${WREN_AI_SERVICE_PORT}
|
|
environment:
|
|
WREN_AI_SERVICE_PORT: ${WREN_AI_SERVICE_PORT}
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
|
OPENAI_API_BASE: ${OPENAI_API_BASE}
|
|
OPENAI_GENERATION_MODEL: ${OPENAI_GENERATION_MODEL}
|
|
QDRANT_HOST: qdrant
|
|
WREN_UI_ENDPOINT: http://wren-ui:${WREN_UI_PORT}
|
|
REDIS_HOST: ${AI_SERVICE_REDIS_HOST}
|
|
REDIS_PORT: ${AI_SERVICE_REDIS_PORT}
|
|
ENABLE_TIMER: ${AI_SERVICE_ENABLE_TIMER}
|
|
LOGGING_LEVEL: ${AI_SERVICE_LOGGING_LEVEL}
|
|
WORKERS: ${AI_SERVICE_WORKERS}
|
|
# sometimes the console won't show print messages,
|
|
# using PYTHONUNBUFFERED: 1 can fix this
|
|
PYTHONUNBUFFERED: 1
|
|
networks:
|
|
- wren
|
|
depends_on:
|
|
- wren-engine
|
|
- qdrant
|
|
|
|
qdrant:
|
|
image: qdrant/qdrant:v1.7.4
|
|
restart: on-failure
|
|
expose:
|
|
- 6333
|
|
- 6334
|
|
volumes:
|
|
- data:/qdrant/storage
|
|
networks:
|
|
- wren
|
|
|
|
redis:
|
|
image: redis:7.0.15-alpine
|
|
restart: on-failure
|
|
ports:
|
|
- 6379:6379
|
|
networks:
|
|
- wren
|
|
|
|
wren-ui:
|
|
image: ghcr.io/canner/wren-ui:${WREN_UI_VERSION}
|
|
restart: on-failure
|
|
platform: ${PLATFORM}
|
|
environment:
|
|
DB_TYPE: sqlite
|
|
# /app is the working directory in the container
|
|
SQLITE_FILE: /app/data/db.sqlite3
|
|
WREN_ENGINE_ENDPOINT: http://wren-engine:${WREN_ENGINE_PORT}
|
|
WREN_AI_ENDPOINT: http://wren-ai-service:${WREN_AI_SERVICE_PORT}
|
|
IBIS_SERVER_ENDPOINT: http://ibis-server:${IBIS_SERVER_PORT}
|
|
OPENAI_GENERATION_MODEL: ${OPENAI_GENERATION_MODEL}
|
|
PG_USERNAME: ${PG_USERNAME}
|
|
PG_PASSWORD: ${PG_PASSWORD}
|
|
# telemetry
|
|
WREN_ENGINE_PORT: ${WREN_ENGINE_PORT}
|
|
WREN_AI_SERVICE_VERSION: ${WREN_AI_SERVICE_VERSION}
|
|
WREN_UI_VERSION: ${WREN_UI_VERSION}
|
|
WREN_ENGINE_VERSION: ${WREN_ENGINE_VERSION}
|
|
USER_UUID: ${USER_UUID}
|
|
POSTHOG_API_KEY: ${POSTHOG_API_KEY}
|
|
POSTHOG_HOST: ${POSTHOG_HOST}
|
|
TELEMETRY_ENABLED: ${TELEMETRY_ENABLED}
|
|
# client side
|
|
NEXT_PUBLIC_USER_UUID: ${USER_UUID}
|
|
NEXT_PUBLIC_POSTHOG_API_KEY: ${POSTHOG_API_KEY}
|
|
NEXT_PUBLIC_POSTHOG_HOST: ${POSTHOG_HOST}
|
|
NEXT_PUBLIC_TELEMETRY_ENABLED: ${TELEMETRY_ENABLED}
|
|
# configs
|
|
WREN_PRODUCT_VERSION: ${WREN_PRODUCT_VERSION}
|
|
ports:
|
|
# HOST_PORT is the port you want to expose to the host machine
|
|
- ${HOST_PORT}:3000
|
|
volumes:
|
|
- data:/app/data
|
|
networks:
|
|
- wren
|
|
depends_on:
|
|
- wren-ai-service
|
|
- wren-engine
|