mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 20:25:12 +00:00
(fix)(build) Add sequential execution to Docker Compose and modify active to prd (#1332)
This commit is contained in:
@@ -62,7 +62,7 @@ Visit http://117.72.46.148:9080 to register and experience as a new user. Please
|
|||||||
|
|
||||||
### Docker Deployment
|
### Docker Deployment
|
||||||
- Install Docker and docker-compose.
|
- Install Docker and docker-compose.
|
||||||
- Download the docker-compose.yml file; Execute https://raw.githubusercontent.com/tencentmusic/supersonic/master/docker/docker-compose.yml.
|
- Download the docker-compose.yml file; Execute: wget https://raw.githubusercontent.com/tencentmusic/supersonic/master/docker/docker-compose.yml.
|
||||||
- Execute "docker-compose up -d".
|
- Execute "docker-compose up -d".
|
||||||
- Open a browser and visit http://localhost:9080 to start exploring.
|
- Open a browser and visit http://localhost:9080 to start exploring.
|
||||||
|
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ WORKDIR /usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION}
|
|||||||
EXPOSE 9080
|
EXPOSE 9080
|
||||||
# Command to run the supersonic daemon
|
# Command to run the supersonic daemon
|
||||||
RUN chmod +x bin/supersonic-daemon.sh
|
RUN chmod +x bin/supersonic-daemon.sh
|
||||||
CMD ["bash", "-c", "bin/supersonic-daemon.sh restart prd && tail -f /dev/null"]
|
CMD ["bash", "-c", "bin/supersonic-daemon.sh restart standalone prd && tail -f /dev/null"]
|
||||||
@@ -1,5 +1,24 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
|
chroma:
|
||||||
|
image: chromadb/chroma:0.5.3
|
||||||
|
container_name: supersonic_chroma
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
volumes:
|
||||||
|
- chroma_data:/chroma
|
||||||
|
networks:
|
||||||
|
- supersonic_network
|
||||||
|
dns:
|
||||||
|
- 114.114.114.114
|
||||||
|
- 8.8.8.8
|
||||||
|
- 8.8.4.4
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "http://0.0.0.0:8000"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
container_name: supersonic_mysql
|
container_name: supersonic_mysql
|
||||||
@@ -18,17 +37,26 @@ services:
|
|||||||
- 114.114.114.114
|
- 114.114.114.114
|
||||||
- 8.8.8.8
|
- 8.8.8.8
|
||||||
- 8.8.4.4
|
- 8.8.4.4
|
||||||
|
depends_on:
|
||||||
|
chroma:
|
||||||
|
condition: service_healthy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
db_init:
|
db_init:
|
||||||
image: supersonicbi/supersonic:${SUPERSONIC_VERSION:-latest}
|
image: supersonicbi/supersonic:${SUPERSONIC_VERSION:-latest}
|
||||||
container_name: supersonic_db_init
|
container_name: supersonic_db_init
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
mysql:
|
||||||
|
condition: service_healthy
|
||||||
networks:
|
networks:
|
||||||
- supersonic_network
|
- supersonic_network
|
||||||
command: >
|
command: >
|
||||||
sh -c "
|
sh -c "
|
||||||
sleep 30 &&
|
sleep 15 &&
|
||||||
if ! mysql -h supersonic_mysql -usupersonic_user -psupersonic_password -e 'use supersonic_db; show tables;' | grep -q 's2_database'; then
|
if ! mysql -h supersonic_mysql -usupersonic_user -psupersonic_password -e 'use supersonic_db; show tables;' | grep -q 's2_database'; then
|
||||||
mysql -h supersonic_mysql -usupersonic_user -psupersonic_password supersonic_db < /usr/src/app/supersonic-standalone-0.9.2-SNAPSHOT/conf/db/schema-mysql.sql &&
|
mysql -h supersonic_mysql -usupersonic_user -psupersonic_password supersonic_db < /usr/src/app/supersonic-standalone-0.9.2-SNAPSHOT/conf/db/schema-mysql.sql &&
|
||||||
mysql -h supersonic_mysql -usupersonic_user -psupersonic_password supersonic_db < /usr/src/app/supersonic-standalone-0.9.2-SNAPSHOT/conf/db/data-mysql.sql
|
mysql -h supersonic_mysql -usupersonic_user -psupersonic_password supersonic_db < /usr/src/app/supersonic-standalone-0.9.2-SNAPSHOT/conf/db/data-mysql.sql
|
||||||
@@ -41,20 +69,6 @@ services:
|
|||||||
- 8.8.8.8
|
- 8.8.8.8
|
||||||
- 8.8.4.4
|
- 8.8.4.4
|
||||||
|
|
||||||
chroma:
|
|
||||||
image: chromadb/chroma:0.5.3
|
|
||||||
container_name: supersonic_chroma
|
|
||||||
ports:
|
|
||||||
- "8000:8000"
|
|
||||||
volumes:
|
|
||||||
- chroma_data:/chroma
|
|
||||||
networks:
|
|
||||||
- supersonic_network
|
|
||||||
dns:
|
|
||||||
- 114.114.114.114
|
|
||||||
- 8.8.8.8
|
|
||||||
- 8.8.4.4
|
|
||||||
|
|
||||||
supersonic_standalone:
|
supersonic_standalone:
|
||||||
image: supersonicbi/supersonic:${SUPERSONIC_VERSION:-latest}
|
image: supersonicbi/supersonic:${SUPERSONIC_VERSION:-latest}
|
||||||
container_name: supersonic_standalone
|
container_name: supersonic_standalone
|
||||||
@@ -63,12 +77,16 @@ services:
|
|||||||
DB_NAME: supersonic_db
|
DB_NAME: supersonic_db
|
||||||
DB_USERNAME: supersonic_user
|
DB_USERNAME: supersonic_user
|
||||||
DB_PASSWORD: supersonic_password
|
DB_PASSWORD: supersonic_password
|
||||||
|
CHROMA_HOST: supersonic_chroma
|
||||||
ports:
|
ports:
|
||||||
- "9080:9080"
|
- "9080:9080"
|
||||||
depends_on:
|
depends_on:
|
||||||
- mysql
|
chroma:
|
||||||
- db_init
|
condition: service_healthy
|
||||||
- chroma
|
mysql:
|
||||||
|
condition: service_healthy
|
||||||
|
db_init:
|
||||||
|
condition: service_completed_successfully
|
||||||
networks:
|
networks:
|
||||||
- supersonic_network
|
- supersonic_network
|
||||||
dns:
|
dns:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ langchain4j:
|
|||||||
|
|
||||||
chroma:
|
chroma:
|
||||||
embedding-store:
|
embedding-store:
|
||||||
baseUrl: http://0.0.0.0:8000
|
baseUrl: http://${CHROMA_HOST}:8000
|
||||||
timeout: 120s
|
timeout: 120s
|
||||||
|
|
||||||
# milvus:
|
# milvus:
|
||||||
|
|||||||
Reference in New Issue
Block a user