文章目录
- 一. Mac
- 1.1 docker-compose.yaml
- 1.2 部署
- 1.3 卸载
- 4. 连接
- 二. Win10
- 2.1 docker-compose.yaml
- 2.2 部署
- 2.3 卸载
参考官方文档 基于单机文件系统部署
一. Mac
1.1 docker-compose.yaml
mkdir -p /Users/wanfei/docker-compose/polardb-pg && cd /Users/wanfei/docker-compose/polardb-pgcat <<EOF> /Users/wanfei/docker-compose/polardb-pg/docker-compose.yaml
version: '3'
services:polardb-pg:restart: alwaysimage: polardb/polardb_pg_local_instancecontainer_name: polardb-pgenvironment:POLARDB_USER: rootPOLARDB_PASSWORD: rootTZ: Asia/Shanghaivolumes:- /Users/wanfei/docker-compose/polardb-pg/data:/var/polardbports:- 54320-54322:5432-5434
EOF
默认数据库:
postgres
;默认用户名:root
1.2 部署
docker-compose -f /Users/wanfei/docker-compose/polardb-pg/docker-compose.yaml up -d
1.3 卸载
docker-compose -f /Users/wanfei/docker-compose/polardb-pg/docker-compose.yaml down
4. 连接
二. Win10
2.1 docker-compose.yaml
mkdir -p /root/i/docker-compose/polardb-pg && cd /root/i/docker-compose/polardb-pgcat <<EOF> /root/i/docker-compose/polardb-pg/docker-compose.yaml
version: '3'
services:polardb-pg:restart: alwaysimage: polardb/polardb_pg_local_instancecontainer_name: polardb-pgenvironment:POLARDB_USER: rootPOLARDB_PASSWORD: rootTZ: Asia/Shanghaivolumes:- /root/i/docker-compose/polardb-pg/data:/var/polardbports:- 54320-54322:5432-5434
EOF
默认数据库:
postgres
;默认用户名:root
2.2 部署
docker-compose -f /root/i/docker-compose/polardb-pg/docker-compose.yaml up -d
2.3 卸载
docker-compose -f /root/i/docker-compose/polardb-pg/docker-compose.yaml down