# dev-only overrides: lighter resources + auto-restart (reduces engine OOM/crash)
services:
  mysql:
    restart: unless-stopped
    command:
      - --default-authentication-plugin=mysql_native_password
      - --innodb_buffer_pool_size=128M
      - --max_connections=50
    deploy:
      resources:
        limits:
          memory: 512M

  redis:
    restart: unless-stopped
    command: redis-server --maxmemory 128mb --maxmemory-policy allkeys-lru
    deploy:
      resources:
        limits:
          memory: 256M
