在WSL中配置使用WSL内已经安装好的postgresql和redis进行安装,但docker日志显示无法连接pg,但是同样的服务器连接信息用psql是可以成功连接pg的,不知道哪里出错。
(pg的端口已经被我改成了5433,不是错误)
......
WARNING:root:Database is not ready yet (attempt 3/10), retrying in 5s... Error: connection failed: connection to server at "127.0.0.1", port 5433 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
WARNING:root:Database is not ready yet (attempt 4/10), retrying in 5s... Error: connection failed: connection to server at "127.0.0.1", port 5433 failed: Connection refused
......
配置文件
# 基础配置
## 安装目录
MAXKB_BASE=/opt
## 服务端口
MAXKB_PORT=8080
## docker 网段设置
MAXKB_DOCKER_SUBNET=172.31.250.192/26
# 数据库配置
## 是否使用外部数据库
MAXKB_EXTERNAL_PGSQL=true
## 数据库地址
PGSQL_HOST=127.0.0.1
## 数据库端口
PGSQL_PORT=5433
## 数据库库名
PGSQL_DB=maxkb
## 数据库用户名
PGSQL_USER=postgres
## 数据库密码
PGSQL_PASSWORD=abcdefg
# Redis配置
## 是否使用外部Redis
MAXKB_EXTERNAL_REDIS=true
## Redis地址
REDIS_HOST=redis
## Redis端口
REDIS_PORT=6379
## Redis数据库
REDIS_DB=10
## Redis密码
REDIS_PASSWORD=abcdefg
# 镜像配置
## 镜像仓库
MAXKB_IMAGE_REPOSITORY=registry.fit2cloud.com/maxkb
## 镜像名称
MAXKB_IMAGE=maxkb
## 版本号
MAXKB_VERSION=v2.10.7-lts
版本:
pg: 18.x
maxkb: 2.10.7