[improvement][project]Adapt docker related scripts to new version.

This commit is contained in:
jerryjzhang
2024-12-26 14:22:45 +08:00
parent 16600ed6f0
commit 8e03531424
9 changed files with 16 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
# Use an official OpenJDK runtime as a parent image
FROM openjdk:8-jdk
FROM openjdk:21-jdk-bullseye
# Set the working directory in the container
WORKDIR /usr/src/app
@@ -7,8 +7,6 @@ WORKDIR /usr/src/app
# Argument to pass in the supersonic version at build time
ARG SUPERSONIC_VERSION
RUN apt-get update
# Install necessary packages, including Postgres client
RUN apt-get update && apt-get install -y postgresql-client

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash
SUPERSONIC_VERSION=0.9.10-SNAPSHOT docker-compose -f docker-compose.yml -p supersonic up
SUPERSONIC_VERSION=latest docker-compose -f docker-compose.yml -p supersonic up

View File

@@ -11,8 +11,8 @@ services:
POSTGRES_PASSWORD: supersonic_password
ports:
- "15432:5432"
volumes:
- postgres_data:/var/lib/postgresql
# volumes:
# - postgres_data:/var/lib/postgresql
networks:
- supersonic_network
dns:
@@ -72,9 +72,9 @@ services:
- 114.114.114.114
- 8.8.8.8
- 8.8.4.4
volumes:
#volumes:
#1.Named Volumes are best for persistent data managed by Docker.
- supersonic_data:/usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}
#- 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.
@@ -84,9 +84,9 @@ services:
# bind:
# propagation: rprivate
# create_host_path: true
volumes:
postgres_data:
supersonic_data:
#volumes:
# postgres_data:
# supersonic_data:
networks:
supersonic_network:

View File

@@ -12,6 +12,7 @@ TAGS="latest"
# If VERSION is provided, add it to TAGS and tag the image as latest
if [ -n "$VERSION" ]; then
TAGS="$TAGS $VERSION"
echo "Tagging Docker images $IMAGE_NAME:$VERSION to $IMAGE_NAME:latest"
docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:latest
fi

View File

@@ -28,7 +28,7 @@ public class QueryStatDO {
private String queryStructCmd;
@TableField("struct_cmd_md5")
private String queryStructCmdMd5;
@TableField("`sql`")
@TableField("query_sql")
private String sql;
private String sqlMd5;
private String queryEngine;

View File

@@ -404,4 +404,5 @@ ALTER TABLE s2_query_stat_info RENAME COLUMN `user` TO `query_user`;
ALTER TABLE s2_chat_context RENAME COLUMN `user` TO `query_user`;
--20241226
alter table s2_chat_memory add column `query_id` BIGINT DEFAULT NULL;
ALTER TABLE s2_chat_memory add column `query_id` BIGINT DEFAULT NULL;
ALTER TABLE s2_query_stat_info RENAME COLUMN `sql` TO `query_sql`;

View File

@@ -299,7 +299,7 @@ CREATE TABLE IF NOT EXISTS `s2_query_stat_info` (
`sql_cmd_md5` varchar(200) DEFAULT NULL, -- sql type request parameter md5
`query_struct_cmd`LONGVARCHAR , -- struct type request parameter
`struct_cmd_md5` varchar(200) DEFAULT NULL, -- struct type request parameter md5值
`sql`LONGVARCHAR ,
`query_sql` LONGVARCHAR ,
`sql_md5` varchar(200) DEFAULT NULL, -- sql md5
`query_engine` varchar(20) DEFAULT NULL,
`elapsed_ms` bigINT DEFAULT NULL,

View File

@@ -336,7 +336,7 @@ CREATE TABLE IF NOT EXISTS `s2_query_stat_info` (
`sql_cmd_md5` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'sql md5值',
`query_struct_cmd` mediumtext COLLATE utf8mb4_unicode_ci COMMENT '对应查询的struct',
`struct_cmd_md5` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'sql md5值',
`sql` mediumtext COLLATE utf8mb4_unicode_ci COMMENT '对应查询的sql',
`query_sql` mediumtext COLLATE utf8mb4_unicode_ci COMMENT '对应查询的sql',
`sql_md5` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'sql md5值',
`query_engine` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '查询引擎',
`elapsed_ms` bigint(10) DEFAULT NULL COMMENT '查询耗时',

View File

@@ -416,7 +416,7 @@ CREATE TABLE IF NOT EXISTS s2_query_stat_info (
sql_cmd_md5 varchar(200) DEFAULT NULL,
query_struct_cmd text,
struct_cmd_md5 varchar(200) DEFAULT NULL,
sql text,
query_sql text,
sql_md5 varchar(200) DEFAULT NULL,
query_engine varchar(20) DEFAULT NULL,
elapsed_ms bigint DEFAULT NULL,