services:
  redis:
    image: redis:7-alpine
    container_name: auto-crossposter-redis
    restart: unless-stopped
    command: ["redis-server", "--appendonly", "yes", "--appendfsync", "everysec"]
    ports:
      - "127.0.0.1:6379:6379"
    volumes:
      - auto_crossposter_redis:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  auto_crossposter_redis:
