docker-compose.test.yml•730 B
services:
postgres_test:
image: postgres:14
container_name: postgres-mcp-test
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
# Reduce shared memory for faster startup
POSTGRES_SHARED_BUFFERS: "128MB"
# Disable fsync for tests (Don't use this in production!)
POSTGRES_FSYNC: "off"
# Speed up startup by skipping recovery
POSTGRES_SKIP_CHECKSUM: "true"
tmpfs:
# Use tmpfs for data for faster performance
- /var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 2s
retries: 5
start_period: 2s