Files
supersonic/docker/docker-compose.yml
Jun Zhang e55f43c737
Some checks are pending
supersonic CentOS CI / build (11) (push) Waiting to run
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic CentOS CI / build (8) (push) Waiting to run
supersonic mac CI / build (11) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic mac CI / build (8) (push) Waiting to run
supersonic ubuntu CI / build (11) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (8) (push) Waiting to run
supersonic windows CI / build (11) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run
supersonic windows CI / build (8) (push) Waiting to run
[improvement]Use QueryWrapper in place of hard-coded SQLs (#1944)
* [improvement][launcher]Use API to get element ID avoiding hard-code.

* [fix][launcher]Fix mysql scripts.

* [improvement][launcher]Support DuckDB database and refactor translator code structure.

* [improvement][headless-fe] Revamped the interaction for semantic modeling routing and successfully implemented the switching between dimension and dataset management.

* [improvement][Headless] Add table ddl in Dbschema

* [improvement][Headless] Add get database by type

* [improvement][Headless] Supports automatic batch creation of models based on db table names.

* [improvement][Headless] Supports getting domain by bizName

* [improvement][launcher]Refactor unit tests and demo data.

* [fix][launcher]Change default vector dimension to 512.

* [improvement](Dict) add dimValueAliasMap info for KnowledgeBaseService

* [improvement][headless]Use QueryWrapper to replace hard-code SQL in mapper xml.

* [improvement][chat]Introduce ChatMemory to delegate ChatMemoryDO.

* [fix][common]Fix embedding store sys configs.

* [fix][common]Fix postgres schema, using varchar instead of char.

* [improvement][launcher]Change supersonic docker deployment from mysql to postgres.

* [Fix][launcher]Fix a number of issues related to semantic modeling.

* [Fix][headless]Fix the evaluation logic of agg type.

* [fix][assembly]Fix Dockerfile and add docker compose run script.

* [fix][chat]Fix "multiple assignments to same column "similar_queries".

* [improvement][headless]Use LamdaQueryWrapper to avoid hard-coded column names.

* [improvement][headless]Refactor headless infra to support advanced semantic modelling.

* [improvement][headless]Change class name `Dim` to `Dimension`.

* [improvement][chat]Introduce `TimeFieldMapper` to always map time field.

* [fix][headless]Remove unnecessary dimension existence check.

* [fix][chat]Fix adjusted filters don't take effect.

---------
2024-12-08 13:32:29 +08:00

92 lines
3.4 KiB
YAML

services:
postgres:
image: pgvector/pgvector:pg17
privileged: true
container_name: supersonic_postgres
environment:
LANG: 'C.UTF-8' # 设置环境变量
POSTGRES_ROOT_PASSWORD: root_password
POSTGRES_DATABASE: postgres
POSTGRES_USER: supersonic_user
POSTGRES_PASSWORD: supersonic_password
ports:
- "15432:5432"
volumes:
- postgres_data:/var/lib/postgresql
networks:
- supersonic_network
dns:
- 114.114.114.114
- 8.8.8.8
- 8.8.4.4
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U supersonic_user -d postgres'"]
interval: 30s
timeout: 10s
retries: 5
db_init:
image: supersonicbi/supersonic:${SUPERSONIC_VERSION:-latest}
privileged: true
container_name: supersonic_db_init
depends_on:
postgres:
condition: service_healthy
networks:
- supersonic_network
command: >
sh -c "
if ! PGPASSWORD=supersonic_password psql -h supersonic_postgres -U supersonic_user -d postgres -c 'select * from s2_database limit 1' > /dev/null;
then
PGPASSWORD=supersonic_password psql -hsupersonic_postgres -U supersonic_user -d postgres < /usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/conf/db/schema-postgres.sql
PGPASSWORD=supersonic_password psql -hsupersonic_postgres -U supersonic_user -d postgres < /usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/conf/db/schema-postgres-demo.sql
PGPASSWORD=supersonic_password psql -hsupersonic_postgres -U supersonic_user -d postgres < /usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/conf/db/data-postgres.sql
PGPASSWORD=supersonic_password psql -hsupersonic_postgres -U supersonic_user -d postgres < /usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/conf/db/data-postgres-demo.sql
else
echo 'Database already initialized.'
fi"
dns:
- 114.114.114.114
- 8.8.8.8
- 8.8.4.4
supersonic_standalone:
image: supersonicbi/supersonic:${SUPERSONIC_VERSION:-latest}
privileged: true
container_name: supersonic_standalone
environment:
DB_HOST: supersonic_postgres
DB_NAME: postgres
DB_USERNAME: supersonic_user
DB_PASSWORD: supersonic_password
ports:
- "9080:9080"
depends_on:
postgres:
condition: service_healthy
db_init:
condition: service_completed_successfully
networks:
- supersonic_network
dns:
- 114.114.114.114
- 8.8.8.8
- 8.8.4.4
volumes:
#1.Named Volumes are best for persistent data managed by Docker.
- supersonic_data:/usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}
#2.Bind Mounts are suitable for frequent modifications and debugging.
# - ./conf/application-prd.yaml:/usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/conf/application-prd.yaml
#3.Detailed Bind Mounts offer more control over the mount behavior.
# - type: bind
# source: ./supersonic-standalone-${SUPERSONIC_VERSION:-latest}/logs
# target: /usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/logs
# bind:
# propagation: rprivate
# create_host_path: true
volumes:
postgres_data:
supersonic_data:
networks:
supersonic_network: