# Development override for MCPTesta Docker Compose # Use with: docker compose -f docker-compose.yml -f docker-compose.dev.yml up services: docs: build: target: development args: NODE_ENV: development environment: NODE_ENV: development # Enable Astro development features ASTRO_TELEMETRY_DISABLED: 1 # Development debugging DEBUG: "astro:*" # Development volume mounts for hot reloading volumes: - ./docs:/app - /app/node_modules # Prevent host node_modules from overriding container - docs_dev_cache:/app/.astro # Cache Astro build artifacts # Development ports (exposed for debugging) ports: - "4321:4321" # Astro dev server - "9229:9229" # Node.js debugging port # Development command with debugging command: ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "4321", "--verbose"] # Relaxed security for development security_opt: [] read_only: false user: "1000:1000" # Development labels (less caching, more verbose) labels: caddy: ${DOCS_DOMAIN:-mcptesta.l.supported.systems} caddy.reverse_proxy: "{{upstreams 4321}}" caddy.encode: gzip caddy.header.Cache-Control: "no-cache, no-store, must-revalidate" caddy.header.X-Dev-Mode: "true" # Development resource limits (more generous) deploy: resources: limits: cpus: '2.0' memory: 1g reservations: memory: 512m # Development file watcher (optional) docs-watcher: image: node:20-alpine working_dir: /app volumes: - ./docs:/app command: > sh -c " apk add --no-cache inotify-tools && while true; do inotifywait -r -e modify,create,delete ./src && echo '🔄 Files changed, Astro will auto-reload...' done " profiles: - watcher networks: - monitoring # Development database for testing (SQLite in volume) dev-db: image: alpine:latest volumes: - dev_data:/data command: > sh -c " mkdir -p /data && touch /data/mcptesta-dev.db && echo 'Development database ready at /data/mcptesta-dev.db' && tail -f /dev/null " profiles: - database networks: - internal # Development Redis for caching tests dev-redis: image: redis:7-alpine ports: - "6379:6379" volumes: - dev_redis:/data command: redis-server --appendonly yes --maxmemory 128mb --maxmemory-policy allkeys-lru profiles: - cache networks: - internal deploy: resources: limits: memory: 128m # Live reload proxy for enhanced development livereload: image: nginx:alpine volumes: - ./config/nginx-dev.conf:/etc/nginx/nginx.conf:ro ports: - "35729:35729" # LiveReload port profiles: - livereload networks: - caddy depends_on: - docs volumes: # Development-specific volumes docs_dev_cache: driver: local name: ${COMPOSE_PROJECT}_docs_dev_cache dev_data: driver: local name: ${COMPOSE_PROJECT}_dev_data dev_redis: driver: local name: ${COMPOSE_PROJECT}_dev_redis