Files
supersonic/docker/docker-compose.yml
jerryjzhang 2e71b9b892
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run
[improvement][docker]Deprecate and remove db_init container in docker-compose.yml.
2025-02-17 22:55:22 +08:00

65 lines
2.0 KiB
YAML

services:
supersonic_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
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:
supersonic_postgres:
condition: service_healthy
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: