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
32 lines
749 B
YAML
32 lines
749 B
YAML
# Production environment - resource limits, logging, restart policy
|
|
services:
|
|
grist-mcp:
|
|
build:
|
|
context: ../..
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "${PORT:-3000}:3000"
|
|
volumes:
|
|
- ./config.yaml:/app/config.yaml:ro
|
|
env_file:
|
|
- .env
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
cpus: "1"
|
|
reservations:
|
|
memory: 128M
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "50m"
|
|
max-file: "5"
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:3000/health')"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|