# Redis overlay — rebuilds with Redis cache support + adds Redis server.
#
# Usage:
#   docker compose -f docker-compose.yml -f docker-compose.postgres.yml -f docker-compose.redis.yml up
#

services:
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
    volumes:
      - redis-data:/data
    command: redis-server --appendonly yes
    restart: unless-stopped

  goclaw:
    build:
      args:
        ENABLE_REDIS: "true"
    environment:
      - GOCLAW_REDIS_DSN=redis://redis:6379/0
    depends_on:
      redis:
        condition: service_started

volumes:
  redis-data:
