-
日志:
|
Beta Was this translation helpful? Give feedback.
Replies: 31 comments
-
看起来是db的问题, 等db 起来之后, 如果不行, 把你的docker-compose.yml 贴出来我试试. |
Beta Was this translation helpful? Give feedback.
-
DB是正常的
|
Beta Was this translation helpful? Give feedback.
-
PG_PASS=970323 |
Beta Was this translation helpful? Give feedback.
-
你下面改了 POSTGRES_PASSWORD: "970323" 另外, 没人反应过代理这个参数是否可以用, 如果可以用你确认一下. |
Beta Was this translation helpful? Give feedback.
-
国内服务器 应该需要配置代理吧? |
Beta Was this translation helpful? Give feedback.
-
刚改了PG_PASS,还是一样的报错 起不来 |
Beta Was this translation helpful? Give feedback.
-
日志一样么? |
Beta Was this translation helpful? Give feedback.
-
你copy 一下我看看. 应该不一样. |
Beta Was this translation helpful? Give feedback.
-
改了docker-compose 以后 |
Beta Was this translation helpful? Give feedback.
-
version: '3'
services:
chat:
container_name: chat
image: ghcr.io/swuecho/chat:latest # or use tag for better stability, e.g.v0.0.3
expose:
- 8080
ports:
# vist at http://your_host:8080 or http://your_host:8080/static/
- 8090:8080
environment:
# at least one key is required.
# !!! no quote aroud key !!!
- OPENAI_API_KEY=sk-xxx # do not change if you do not have openai api key
#- CLAUDE_API_KEY=thisisclaudekey # do not change if you do not have claude api key
# api call in 10min
# set this to zero if your server is in public network. only increase ratelimit in admin panel for trusted users.
- OPENAI_RATELIMIT=100
# DB config, set based on your db config if you don't use the db in docker-compose
- PG_HOST=db
- PG_DB=postgres
- PG_USER=postgres
- PG_PASS=970323
- PG_PORT=5432
# or DATABASE_URL, with the 5 var above
# you might need set proxy
- OPENAI_PROXY_URL=http://10.0.3.9:7890
depends_on:
db:
condition: service_healthy
db:
image: postgres:14
restart: always
user: postgres
environment:
TZ: "Asia/Shanghai"
PGTZ: "Asia/Shanghai"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "970323"
expose:
- 5432
ports:
- "5432:5432"
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready",
"-q",
"-d",
"postgres",
"-U",
"postgres"
]
interval: 5s
timeout: 5s
retries: 5
docker-compose up -d
docker logs -f chat
|
Beta Was this translation helpful? Give feedback.
-
另外你的端口有问题:
|
Beta Was this translation helpful? Give feedback.
-
我这边有具体的报错信息, 你那边不知道为什么没有 |
Beta Was this translation helpful? Give feedback.
-
端口改了还是一样的报错;DB容器名称我看是chat-db-1 yaml中的HOST需要改吗?大佬不行你构建个linux的二进制文件?我手动部署下DB 试试看行不行? |
Beta Was this translation helpful? Give feedback.
-
目前就是db的问题 你用docker compose down 都删了 重新来 试试 |
Beta Was this translation helpful? Give feedback.
-
就是删除后 重新来的 |
Beta Was this translation helpful? Give feedback.
-
psql postgresql://postgres:[email protected]:5432/postgres 你试试postgresql 能链接上么 应该是db 出了问题, 感觉能解决, 不行再看你本地安装pg, 然后 chat 还走docker. |
Beta Was this translation helpful? Give feedback.
-
psql postgresql://postgres:[email protected]:5432/postgres postgres=# help |
Beta Was this translation helpful? Give feedback.
-
麻烦再贴一下你的docker-compose 我在我的机器上试一下 |
Beta Was this translation helpful? Give feedback.
-
还用的这个 没有改 |
Beta Was this translation helpful? Give feedback.
-
expose改成了8090 |
Beta Was this translation helpful? Give feedback.
-
我这边把这个删了.(因为跟我这边的docker-compse 版本不兼容)
然后 docker-compose up -d 起不来, 因为db 第一次启动需要时间. 看log 是报错的. 但是重新 docker-compose up -d 一次, chat 就行了. 你那边起不来, 应该处于第一次up 之后, 所以, 你再次 docker-compose up -d 就好了. |
Beta Was this translation helpful? Give feedback.
-
前面的报错是第一次docker-compose up -d 的时候的, 再一次 就可以了. |
Beta Was this translation helpful? Give feedback.
-
我删除所有镜像 再试试
|
Beta Was this translation helpful? Give feedback.
-
还是不行,我随便找了台机器 就直接起来了 这台机器不知道哪里出问题了 日志没啥显示 |
Beta Was this translation helpful? Give feedback.
-
你可以按照我之前讲的, 独立安装postgres, 这样数据管理还容易一点, 然后跑chat 这个一个image 我弄个go binary 也不麻烦,但是问题只会更多.哈哈. |
Beta Was this translation helpful? Give feedback.
-
看db的log 如果db 已经起来了, 再次docker-compose up -d ,这个不行我也不知道咋办了. |
Beta Was this translation helpful? Give feedback.
-
DB启动没问题。chat启动5秒里面就挂了 |
Beta Was this translation helpful? Give feedback.
-
这个我这边应该没啥可以处理的了, 如果proxy url 有问题, 你再开个帖子就行了. |
Beta Was this translation helpful? Give feedback.
我这边把这个删了.(因为跟我这边的docker-compse 版本不兼容)
然后 docker-compose up -d
起不来, 因为db 第一次启动需要时间. 看log 是报错的.
但是重新 docker-compose up -d 一次, chat 就行了.
你那边起不来, 应该处于第一次up 之后,
所以, 你再次 docker-compose up -d 就好了.