docker-compose.postgres.yml•1.05 kB
services:
postgres:
image: postgres:15-alpine
environment:
- POSTGRES_DB=mcp_prompts
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
mcp-prompts-postgres:
build:
context: .
dockerfile: Dockerfile.postgres
environment:
- HOST=0.0.0.0
- PORT=3003
- MODE=mcp
- STORAGE_TYPE=postgres
- POSTGRES_URL=postgres://postgres:postgres@postgres:5432/mcp_prompts
ports:
- "3003:3003"
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3003/health', (res) => process.exit(res.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
postgres_data: