Skip to content

Commit f89eb52

Browse files
authored
改进 测试数据库 启动配置 (#916)
* 该进 测试数据库 启动配置 * update install-docker-compose.sh * update database docker-compose.yaml
1 parent 96cda39 commit f89eb52

File tree

7 files changed

+37
-19
lines changed

7 files changed

+37
-19
lines changed

.github/workflows/linux-x86_64.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,9 @@ jobs:
126126
- name: Start Database
127127
run: |
128128
# 准备数据库容器
129-
export PATH=/usr/libexec/docker/cli-plugins/:$PATH
130-
docker-compose version
129+
docker compose version
131130
docker container ls -a
132-
bash sapi/src/UnitTest/scripts/database/start.sh
131+
bash sapi/docker/database/start.sh
133132
134133
- name: Show Build Result
135134
run: |

sapi/src/UnitTest/scripts/database/docker-compose.yaml sapi/docker/database/docker-compose.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
version: "3"
1+
name: "database"
22
services:
33
postgresql-server:
4-
image: postgres:16-alpine
5-
# image: postgis/postgis:16-3.4-alpine
4+
image: postgres:17-alpine
65
hostname: "postgresql"
76
container_name: "postgresql"
87
ports:

sapi/docker/database/my.cnf

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
[client]
3+
default-character-set=utf8mb4
4+
[mysql]
5+
default-character-set=utf8mb4
6+
7+
[mysqld]
8+
skip_ssl
9+
skip-ssl-session-cache-mode
10+
11+
# bind-address = 0.0.0.0
12+
bind-address = 0.0.0.0
13+
# bind-address = ::
14+
15+
# 跳过密码登录
16+
# skip-grant-tables
17+
18+
collation-server = utf8mb4_unicode_ci
19+
init-connect='SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci'
20+
character-set-server = utf8mb4
21+
innodb_ft_min_token_size = 1
22+
ft_min_word_len = 1
23+
innodb_ft_enable_stopword = OFF
24+
ft_stopword_file = ''
25+
26+
27+

sapi/src/UnitTest/scripts/database/start.sh sapi/docker/database/start.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ __DIR__=$(
88

99
cd ${__DIR__}
1010

11-
docker-compose -f docker-compose.yaml up -d
12-
docker-compose -f docker-compose.yaml ps
11+
docker compose -f docker-compose.yaml up -d
12+
docker compose -f docker-compose.yaml ps
1313

1414
docker container ls -a
1515

sapi/src/UnitTest/scripts/database/stop.sh sapi/docker/database/stop.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ __DIR__=$(
88

99
cd ${__DIR__}
1010

11-
docker-compose -f docker-compose.yaml down --remove-orphans
11+
docker compose -f docker-compose.yaml down --remove-orphans

sapi/quickstart/linux/install-docker-compose.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@ if [ ! -f /usr/libexec/docker/cli-plugins/docker-compose ]; then
2424

2525
# show more version info
2626
# https://github.com/docker/compose/releases
27-
VERSION="v2.32.1"
27+
VERSION="v2.32.4"
2828

2929
curl -fsSL "https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
3030

3131
chmod +x /usr/local/bin/docker-compose
3232
else
33-
export PATH=/usr/libexec/docker/cli-plugins/:$PATH
33+
# export PATH=/usr/libexec/docker/cli-plugins/:$PATH
34+
ln -sf /usr/libexec/docker/cli-plugins/docker-compose /usr/local/bin/docker-compose
3435
fi
3536

3637
docker-compose --version

sapi/src/UnitTest/scripts/database/my.cnf

-8
This file was deleted.

0 commit comments

Comments
 (0)