docker-compose.test.yml•1.56 kB
version: '3.8'
services:
mcp-server:
build:
context: ../mcp
dockerfile: Dockerfile
ports:
- "8080:8080"
- "3001:3001" # Metrics port
environment:
NODE_ENV: test
LOG_LEVEL: info
CORS_ORIGINS: "http://localhost:3000,http://test-app:3000"
RATE_LIMIT_MAX: "1000"
RATE_LIMIT_WINDOW: "900000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
networks:
- curupira-test
test-app:
build:
context: ./test-app
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
NODE_ENV: test
MCP_SERVER_URL: "ws://mcp-server:8080/mcp"
depends_on:
mcp-server:
condition: service_healthy
networks:
- curupira-test
e2e-tests:
build:
context: .
dockerfile: Dockerfile.e2e
environment:
BASE_URL: "http://test-app:3000"
MCP_SERVER_URL: "ws://mcp-server:8080/mcp"
CI: "true"
SKIP_SERVER_START: "true"
SKIP_APP_START: "true"
volumes:
- ./test-results:/app/test-results
- ./playwright-report:/app/playwright-report
- ../chrome-extension/dist:/app/chrome-extension/dist:ro
depends_on:
mcp-server:
condition: service_healthy
test-app:
condition: service_started
networks:
- curupira-test
command: npm run test
networks:
curupira-test:
driver: bridge
volumes:
test-results:
playwright-report: