Skip to content

Commit dd34dda

Browse files
committed
ci: 增加postgresql.sh启动测试环境脚本
1 parent a7e705f commit dd34dda

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/postgresql.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
# 删除可能存在的容器
4+
docker rm -f storage-lock-postgres
5+
6+
# 启动测试使用的Postgresql数据库
7+
docker run -d --name storage-lock-postgres -p 5432:5432 -e POSTGRES_PASSWORD=UeGqAm8CxYGldMDLoNNt postgres:14
8+
9+
# 设置环境变量
10+
export STORAGE_LOCK_POSTGRESQL_DSN="host=127.0.0.1 user=postgres password=UeGqAm8CxYGldMDLoNNt port=5432 dbname=postgres sslmode=disable"

0 commit comments

Comments
 (0)