https://github.com/polaris-contrib/store-postgresql
在 Polaris 中提供基于 postgresql 实现的存储层
https://github.com/polaris-contrib/store-postgresql
plugin polaris polarismesh postgresql
Last synced: about 2 months ago
JSON representation
在 Polaris 中提供基于 postgresql 实现的存储层
- Host: GitHub
- URL: https://github.com/polaris-contrib/store-postgresql
- Owner: polaris-contrib
- License: other
- Created: 2023-05-31T07:52:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-12T17:59:52.000Z (7 months ago)
- Last Synced: 2025-03-24T17:55:16.118Z (3 months ago)
- Topics: plugin, polaris, polarismesh, postgresql
- Language: Go
- Homepage:
- Size: 333 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# polaris-store-postgresql
## 如何使用
#### 构建
执行构建脚本 `Makefile` 即可
```bash
# ${store_pg_plugin_version}: store-postgresql 插件版本,默认为 main 的最新 commit
# ${polaris_server_tag}: 北极星服务端版本信息,默认为 main 分支
make build STORE_PG_PLUGIN_VERSION=latest POLARIS_SERVER_VERSION=${polaris_server_tag}
```#### 配置文件调整
修改 **conf/polaris-server.yaml** 文件,参考下列配置调整 store 的配置信息
```yaml
# Storage configuration
store:
## Database storage plugin
name: defaultStore
option:
master:
# 设置数据库类型为 postgresql
dbType: "postgres"
dbName: "polaris_server"
dbUser: "改成自已有用户名" ##DB_USER##
dbPwd: "改成自已的密码" ##DB_PWD##
dbAddr: "改成自已的IP" ##DB_ADDR##
dbPort: "改成自已的端口"
maxOpenConns: -1
maxIdleConns: -1
connMaxLifetime: 300 # 单位秒
```