services:
  redis-slave:
    image: bitnamilegacy/redis:8.0
    restart: always
    container_name: ${CONTAINER_NAME}
    networks:
      - opsmind-network
    ports:
      - ${PANEL_APP_PORT_HTTP}:6379
    volumes:
      - ./data:/bitnami/redis/data
      - ./logs:/opt/bitnami/redis/logs
    environment:
      REDIS_REPLICATION_MODE: slave
      REDIS_MASTER_HOST: ${MASTER_HOST}
      REDIS_MASTER_PORT_NUMBER: ${MASTER_PORT}
      REDIS_MASTER_PASSWORD: ${MASTER_ROOT_PASSWORD}
      REDIS_PASSWORD: ${PANEL_REDIS_ROOT_PASSWORD}
      REDIS_EXTRA_FLAGS: --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
    labels:
      createdBy: "Apps"
networks:
  opsmind-network:
    external: true