version: '3.9' services: redis: image: redis:latest container_name: redis ports: - "6379:6379" volumes: - redis_data:/data deploy: resources: limits: memory: 512M # Adjust memory limit as needed command: redis-server --save 60 1 --loglevel warning labels: - "traefik.enabled=false" volumes: redis_data: driver: local