version: "3.8"
services:
  cache:
    image: redis:latest
    restart: always
    ports:
      - "6379:6379"
      # get password from env
    command:
      redis-server --save 20 1 --loglevel warning --requirepass $REDIS_PASSWORD
    environment:
      - REDIS_PASSWORD=redispassword
    volumes:
      - cache:/data
volumes:
  cache:
    driver: local
