---
# docker-compose file for redis
# DOCKER_HOST=dkhost:2376 docker stack deploy -c docker-compose.yml services

version: '3.4'
services:

  redis:
    image: "redis:4-alpine"
    ports:
      - "6379:6379"

    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: any
        delay: "1s"
        max_attempts: 3
      update_config:
        parallelism: 1
        delay: 2s
        order: start-first
      resources:
        limits:
          cpus: '0.5'
          memory: 256M

    logging:
      driver: fluentd
      options:
        fluentd-address: "logs.xai-corp.net:24224"
        fluentd-async-connect: 'true'
        tag: redis

    networks:
      - prod_cache
