# This template needs to be included in docker-compose.yml, which depend on redis
{% set redis_image = applications | get_app_conf('svc-db-redis', 'docker.services.redis.image') %}
{% set redis_version = applications | get_app_conf('svc-db-redis', 'docker.services.redis.version')%}
  redis:
    image: "{{ redis_image }}:{{ redis_version }}"
    container_name: {{ application_id | get_entity_name }}-redis
    restart: {{ DOCKER_RESTART_POLICY }}
    logging:
      driver: journald
    volumes:
      - redis:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 1s
      timeout: 3s
      retries: 30
    networks:
      - default
{{ "\n" }}