fix(db): enable test env cold-start migrations on empty database.
Use pgvector image with extensions-only init, seed legacy users before project/chat fixtures, and align test compose with goose-only schema bootstrap. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
weichen
co-authored by
Cursor
parent
f73988e567
commit
72879c6e22
@@ -9,7 +9,7 @@ name: agent-test
|
||||
|
||||
services:
|
||||
system-db:
|
||||
image: postgres:16-alpine
|
||||
image: pgvector/pgvector:pg16
|
||||
container_name: shuimu-system-pg-test
|
||||
command: ["postgres", "-c", "shared_buffers=256MB", "-c", "max_connections=150"]
|
||||
environment:
|
||||
@@ -20,7 +20,7 @@ services:
|
||||
- "127.0.0.1:${SYSTEM_DB_PUBLISH_PORT:-5434}:5432"
|
||||
volumes:
|
||||
- test-system-pgdata:/var/lib/postgresql/data
|
||||
- ./deploy/postgres/system_init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
|
||||
- ./deploy/postgres/extensions_init.sql:/docker-entrypoint-initdb.d/01-extensions.sql:ro
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${SYSTEM_DB_USER:-app} -d ${SYSTEM_DB_NAME:-agent_system_test}"]
|
||||
interval: 5s
|
||||
|
||||
Reference in New Issue
Block a user