services:
  ykf-decotv:
    image: ghcr.io/decohererk/decotv:latest
    container_name: ykf-decotv-app
    restart: unless-stopped
    ports:
      - '3010:3000' # 映射到宿主机 3010 端口
    environment:
      - USERNAME=admin
      - PASSWORD=PASSWORD
      - NEXT_PUBLIC_SITE_NAME=YKF-TV
      - NEXT_PUBLIC_STORAGE_TYPE=redis # 明确使用内存存储
      - REDIS_URL=redis://ykf-redis-db:6379
    networks:
      - ykf-tv-net
    depends_on:
      - ykf-redis-db

  ykf-redis-db:
    image: redis:alpine
    container_name: ykf-decotv-redis # 独立的容器名
    restart: unless-stopped
    # 启用 AOF 持久化，进一步降低数据丢失风险
    command: redis-server --appendonly yes
    networks:
      - ykf-tv-net

networks:
  ykf-tv-net:
    driver: bridge