<?xml version="1.0"?>
<Container version="2">
  <Name>ReStreamer-Watchdog</Name>
  <!-- No Docker Hub account needed. This runs the official node:18 image and
       downloads the app from streamhelpers.com into the appdata folder on start,
       which is the same method as the documented one-line install. -->
  <Repository>node:18</Repository>
  <Registry>https://hub.docker.com/_/node</Registry>
  <Network>bridge</Network>
  <MyIP/>
  <Shell>bash</Shell>
  <Privileged>false</Privileged>
  <Support>https://streamhelpers.com/restreamer-watchdog/</Support>
  <Project>https://streamhelpers.com/restreamer-watchdog/</Project>
  <Overview>Monitors a datarhei ReStreamer instance and pushes a looping fallback video to your streaming platforms when the source stops transmitting. Includes a dark web dashboard. Point it at your Restreamer Core URL, log in, and choose a fallback video placed in the app data folder. On each start the container installs ffmpeg and downloads the latest app files from streamhelpers.com into your appdata folder, so the first boot takes a few minutes - watch the container log. Put your fallback .mp4 in the appdata folder before starting. Provided as-is with no warranty; see https://streamhelpers.com/legal.html</Overview>
  <Category>MediaApp:Video Tools:</Category>
  <WebUI>http://[IP]:[PORT:1975]/</WebUI>
  <TemplateURL/>
  <Icon>https://streamhelpers.com/restreamer-watchdog/icon.png</Icon>
  <ExtraParams>-w /app</ExtraParams>
  <PostArgs>bash -c "apt-get update &amp;&amp; apt-get install -y --no-install-recommends ffmpeg ca-certificates curl &amp;&amp; cd /app &amp;&amp; curl -fsSL -O https://streamhelpers.com/restreamer-watchdog/server.js -O https://streamhelpers.com/restreamer-watchdog/package.json &amp;&amp; npm install --omit=dev &amp;&amp; node server.js"</PostArgs>
  <CPUset/>
  <DateInstalled/>
  <DonateText/>
  <DonateLink/>
  <Description>Monitors datarhei ReStreamer and provides a fallback video when the input source drops. Another fine product of Blue Soup Enterprises.</Description>
  <Networking>
    <Mode>bridge</Mode>
    <Publish>
      <Port>
        <HostPort>1975</HostPort>
        <ContainerPort>1975</ContainerPort>
        <Protocol>tcp</Protocol>
      </Port>
    </Publish>
  </Networking>
  <Data>
    <Volume>
      <HostDir>/mnt/user/appdata/restreamer-watchdog</HostDir>
      <ContainerDir>/app</ContainerDir>
      <Mode>rw</Mode>
    </Volume>
  </Data>
  <Environment>
    <Variable>
      <Value>1975</Value>
      <Name>PORT</Name>
      <Mode/>
    </Variable>
    <Variable>
      <Value>http://192.168.0.120:8080</Value>
      <Name>RESTREAMER_URL</Name>
      <Mode/>
    </Variable>
    <Variable>
      <Value>admin</Value>
      <Name>RESTREAMER_USER</Name>
      <Mode/>
    </Variable>
    <Variable>
      <Value/>
      <Name>RESTREAMER_PASS</Name>
      <Mode/>
    </Variable>
    <Variable>
      <Value>fallback.mp4</Value>
      <Name>FALLBACK_FILE</Name>
      <Mode/>
    </Variable>
  </Environment>
  <Config Name="WebUI Port" Target="1975" Default="1975" Mode="tcp" Description="Port for the watchdog dashboard" Type="Port" Display="always" Required="true" Mask="false">1975</Config>
  <Config Name="App Data (app files + config + fallback video)" Target="/app" Default="/mnt/user/appdata/restreamer-watchdog" Mode="rw" Description="Holds the downloaded app files, config.json and your fallback video. Put fallback.mp4 in this folder before starting." Type="Path" Display="always" Required="true" Mask="false">/mnt/user/appdata/restreamer-watchdog</Config>
  <Config Name="ReStreamer URL" Target="RESTREAMER_URL" Default="http://192.168.0.120:8080" Mode="" Description="Your Restreamer Core HTTP address (the web UI/API URL, not the SRT/RTMP port)." Type="Variable" Display="always" Required="true" Mask="false">http://192.168.0.120:8080</Config>
  <Config Name="ReStreamer Username" Target="RESTREAMER_USER" Default="admin" Mode="" Description="Restreamer login username (same as the web UI)." Type="Variable" Display="always" Required="true" Mask="false">admin</Config>
  <Config Name="ReStreamer Password" Target="RESTREAMER_PASS" Default="" Mode="" Description="Restreamer login password." Type="Variable" Display="always" Required="true" Mask="true"></Config>
  <Config Name="Fallback Filename" Target="FALLBACK_FILE" Default="fallback.mp4" Mode="" Description="Name of the fallback video file inside the App Data folder." Type="Variable" Display="always" Required="true" Mask="false">fallback.mp4</Config>
</Container>
