fix: 修复 Docker Compose 环境下 PostgreSQL 连接失败
This commit is contained in:
@@ -23,7 +23,8 @@ services:
|
||||
- CAMTALK_STORAGE_DSN=postgres://camtalk:camtalk123@postgres:5432/camtalk?sslmode=disable
|
||||
- CAMTALK_AUTH_JWT_SECRET=78uWBBAF8XEQEotKDlrnlnd4y8i4WN3E4zXmNmC8BYQ=
|
||||
depends_on:
|
||||
- postgres
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- camtalk-net
|
||||
restart: unless-stopped
|
||||
@@ -41,6 +42,11 @@ services:
|
||||
- ./backend/migrations:/docker-entrypoint-initdb.d
|
||||
networks:
|
||||
- camtalk-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U camtalk -d camtalk"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user