Reorganize Docker configuration into environment-specific directories: - deploy/dev/: Development with hot reload and source mounting - deploy/test/: Ephemeral testing with branch isolation and dynamic ports - deploy/prod/: Production with resource limits, logging, and restart policy Key improvements in test compose: - Dynamic ports (no fixed 3000/8484) for parallel test runs - Branch-isolated container/network names via TEST_INSTANCE_ID - service_healthy condition instead of service_started - Increased retry counts for stability
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
# Test environment - ephemeral, branch-isolated
|
|
services:
|
|
grist-mcp:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile
|
|
container_name: grist-mcp-test-${TEST_INSTANCE_ID:-default}
|
|
ports:
|
|
- "3000" # Dynamic port
|
|
environment:
|
|
- CONFIG_PATH=/app/config.yaml
|
|
- GRIST_MCP_TOKEN=test-token
|
|
- PORT=3000
|
|
volumes:
|
|
- ../../tests/integration/config.test.yaml:/app/config.yaml:ro
|
|
depends_on:
|
|
mock-grist:
|
|
condition: service_healthy
|
|
networks:
|
|
- test-net
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:3000/health')"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
|
|
mock-grist:
|
|
build:
|
|
context: ../../tests/integration/mock_grist
|
|
container_name: mock-grist-test-${TEST_INSTANCE_ID:-default}
|
|
ports:
|
|
- "8484" # Dynamic port
|
|
environment:
|
|
- PORT=8484
|
|
networks:
|
|
- test-net
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8484/health')"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
|
|
networks:
|
|
test-net:
|
|
name: grist-mcp-test-${TEST_INSTANCE_ID:-default}
|
|
driver: bridge
|