Project One-Click: All-in-One Installations of Docker Extensions and CDVR Custom Channels

Forgot to update the script that does that in the main repo -- so it's fixed (but haven't built a new container just yet) -- thanks.

I'm a bit less sure of how to deal with this, though adding feedback in standard output is a good suggestion. /shares/DVR is a directory inside the container, and it's as designated by the Channels devs. Here's their recommended compose from Docker Hub:

 channels-dvr:
  image: fancybits/channels-dvr:latest
  container_name: channels-dvr
  network_mode: host
  ports:
    - "8089:8089"
  restart: unless-stopped
  devices:
    - /dev/dri:/dev/dri
  volumes:
    - /mnt/disk/dvr/config:/channels-dvr
    - /mnt/disk/dvr/recordings:/shares/DVR

Have you been doing it a different way with the CDVR containers you've been running? It's possible that directory name has no significance, and could be pretty much anything -- but I don't know that for sure.

For the :/shares/DVR directory, it can be any valid linux path in the container. When the container is created, it will create that path in the container. You have to specify what it is anyway in the Channels DVR setup.
I like this (although it might not work on Windows)

And the issue with ports.
If Channels DVR container is using host network mode, it needs CHANNELS_PORT to change the port Channels DVR uses within the container, since that is the port exposed to the host.
If Channels DVR container is using bridge network mode, it needs just HOST_PORT which is port mapped to the Channels DVR container port 8089.

Using network_mode: host negates the need to map ports (not valid in host mode)

  ports:
    - "8089:8089"

And that compose wouldn't work if the user already had something using port 8089 since the compose doesn't include this

    environment:
      - CHANNELS_PORT=8190                               # MODIFY the host port number to use

This works (appears the port mapping is ignored since host mode was specified)

version: '3.9'
services:
  # 2024.09.13
  # Docker Hub home for this project: https://hub.docker.com/r/fancybits/channels-dvr
  channels-dvr:
    image: fancybits/channels-dvr:${TAG}
    container_name: channels-dvr
    devices:
      - /dev/dri:/dev/dri
    ports:
      - ${HOST_PORT}:${CHANNELS_PORT}
    environment:
      - CHANNELS_PORT=${CHANNELS_PORT}
      - TZ=${TZ}
    volumes:
      - ${HOST_DIR}/channels-dvr:/channels-dvr
      - ${DVR_SHARE}:/shares/DVR
    network_mode: host
    restart: unless-stopped
#volumes: # use this section if you've setup a docker volume named channels-dvr, with CIFS or NFS, to bind to /channels-dvr inside the container
  #channels-dvr:
    #external: ${VOL_EXTERNAL}
    #name: ${VOL_NAME}

TAG=tve
HOST_PORT=8589
CHANNELS_PORT=8589
TZ=America/Los_Angeles
HOST_DIR=/volume1/docker
DVR_SHARE=/volume1/ChDVRpoc


Screenshot 2024-09-14 at 15-49-50 Channels Settings

Don't know how helpful this is but here is one I set up sometime back, just stopped using it because could not get hardware transcoding working.

# channels compose

version: '3.9'
services:
  channels-dvr:
    image: fancybits/channels-dvr:tve
    container_name: channels-dvr
#    network_mode: host
    ports:
      - 192.168.50.149:8089:8089
    environment:
#     - CHANNELS_DVR=192.168.50.219:8089 # Add your Channels DVR server in the form hostname:port or ip:port
#     - CHANNELS_CLIENTS=192.168.50.21 # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP
#     - UPDATE_YAMLS=true # Set this to true to update config.yaml
#     - UPDATE_SCRIPTS=true # Set this to true to update all included scripts
      - TZ=US/Pacific # Add your local timezone in standard linux format. E.G. US/Eastern, US/Central, US/Mountain, US/Pacific, etc  
    devices:
#      - /dev/dri:/dev/dri
    volumes:
#      - dvr-config:/channels-dvr
      - DVR:/shares/DVR
    restart: unless-stopped  
volumes: # use this section if you've setup a docker volume named channels-dvr, with CIFS or NFS, to bind to /mnt/dvr inside the container
#  dvr-config:
#    external: true
  DVR:
    external: true


channels.env

NVIDIA_VISIBLE_DEVICES=all
NVIDIA_DRIVER_CAPABILITIES=compute,video,utility

then again I'm still fighting to get OliveTin fully functional, using Docker Desktop and I have trouble getting Windows and Linux playing nicely. Then again it's probably me :wink:

And finally, here is what I would want to use, making the path inside the container the same as on the host for the DVR directory. Added DVR_CONTAINER_DIRECTORY

version: '3.9'
services:
  # 2024.09.13
  # Docker Hub home for this project: https://hub.docker.com/r/fancybits/channels-dvr
  channels-dvr:
    image: fancybits/channels-dvr:${TAG}
    container_name: channels-dvr
    devices:
      - /dev/dri:/dev/dri
    ports:
      - ${HOST_PORT}:${CHANNELS_PORT}
    environment:
      - CHANNELS_PORT=${CHANNELS_PORT}
      - TZ=${TZ}
    volumes:
      - ${HOST_DIR}/channels-dvr:/channels-dvr
      - ${DVR_SHARE}:${DVR_CONTAINER_DIRECTORY}
    network_mode: host
    restart: unless-stopped
#volumes: # use this section if you've setup a docker volume named channels-dvr, with CIFS or NFS, to bind to /channels-dvr inside the container
  #channels-dvr:
    #external: ${VOL_EXTERNAL}
    #name: ${VOL_NAME}

TAG=tve
HOST_PORT=8589
CHANNELS_PORT=8589
TZ=America/Los_Angeles
HOST_DIR=/volume1/docker
DVR_SHARE=/volume1/ChDVRpoc
DVR_CONTAINER_DIRECTORY=/volume1/ChDVRpoc



But then I'm not your typical Project One-Click user

I believe we're in sync on the points you've made in your last few posts. I'll make some changes in the morning, and push a new version at some point tomorrow.

I'm planning to do the following:

  • Include the fix for uncommenting devices:, - /dev/dri:/dev/dri, and network_mode: host as required.

  • Comment out ports: and - ${HOST_PORT}:${CHANNELS_PORT} when network_mode: host is being used to avoid confusion.

  • Make the container-side folder an environment variable in - ${DVR_SHARE}:/shares/DVR.

  • Add some additional comments in the descriptions of several fields in the WebUI, and to standard output.

Hopefully that will cover what's been identified as areas for improvement. :slight_smile:

1 Like

@chDVRuser I've implemented the above, along with the ability to spin-up multiple CDVR containers on a single Docker host. Any number used as a CDVR_CONTAINER value will be appended to the stack name, container name and to ${HOST_DIR}/channels-dvr[2, 3, 4 or whatever integer].

Pushed just now, so if you could give it a try when you have a moment I'd appreciate it!

Let me know if there's anything I can do to help. Docker Desktop for Windows definitely has its challenges when it comes to more deploying more "advanced" containers like OliveTin, that need both inbound and outbound network connections -- along with fully functioning WSL integration.

I've had, and fixed, some of these issues in the past, especially related to some of the more subtle types of problems with Docker Desktop's internal data. Ping me in the OliveTin thread if you want to pursue this.

Was looking good


Until I clicked Start

That's all I see

My guess is the error means "#" isn't an integer

  - title: Create a Channels DVR Stack in Portainer
    arguments:
      - name: CDVR_CONTAINER
        type: int
        description: If you have multiple CDVR containers running on a single Docker host, this number will be appended to stack, container and path names. Leave as "#" for none.
        default: "#"

Because using 2 worked.


Portainer Stacks>channels-dvr2

version: '3.9'
services:
  # 2024.09.15
  # Docker Hub home for this project: https://hub.docker.com/r/fancybits/channels-dvr
  channels-dvr:
    image: fancybits/channels-dvr:${TAG}
    container_name: channels-dvr2
    devices:
      - /dev/dri:/dev/dri
    #ports:
      #- ${HOST_PORT}:${CHANNELS_PORT}
    environment:
      - CHANNELS_PORT=${CHANNELS_PORT}
      - TZ=${TZ}
    volumes:
      - ${HOST_DIR}/channels-dvr2:/channels-dvr
      - ${DVR_SHARE}:${DVR_CONTAINER_DIR}
    network_mode: host
    restart: unless-stopped
#volumes: # use this section if you've setup a docker volume named channels-dvr, with CIFS or NFS, to bind to /channels-dvr inside the container
  #channels-dvr:
    #external: ${VOL_EXTERNAL}
    #name: ${VOL_NAME}

TAG=tve
HOST_PORT=8089
CHANNELS_PORT=8689
TZ=America/Los_Angeles
HOST_DIR=/volume1/docker
DVR_SHARE=/volume1/ChDVRpoc2
DVR_CONTAINER_DIR=/volume1/ChDVRpoc2
NETWORK_MODE=host
DEVICES=true
CDVR_CONTAINER=2

Is it possible to display the values for HOST_DIR and DVR_SHARE?
Using ${HOST_DIR} and ${DVR_SHARE} in your config.yaml doesn't display the values.

If I'm running this on a Synology box, I recognize ${HOST_DIR}/channels-dvr and ${DVR_SHARE} need to exist before clicking "Start" (Click to confirm):

I also noticed the same issue with the Post-Install Healthcheck

Add host healthcheck (requires running sudo -E ./fifopipe_hostside.sh "$PATH" from host directory bound to /config first!).

Right you are. Fixed now. Re-pull when you have a moment.

Thanks for the assist in testing!

You have a winner!
Now, if you can only find someone to test it on Windows (not me).

I don't think so, but I see what you're getting at -- so I'll take another look.

In that case that command, including "$PATH" is correct, as shown.

1 Like

And the finishing touches to make it shine would be Project One-Click: All-in-One Installations of Docker Extensions and CDVR Custom Channels - #187 by chDVRuser

UPDATED:

A new stack, named channels-dvr{CDVR_CONTAINER} has been created in Portainer at http://{PORTAINER_HOST}:9000
You can now access your new Channels DVR container at http://{PORTAINER_HOST}:{HOST_PORT} (if bridge network), or http://{PORTAINER_HOST}:{CHANNELS_PORT} (if host network).
Setup Channels DVR to use this container directory {DVR_CONTAINER_DIR} (case sensitive) for storing recordings, since that is mapped to the host directory {DVR_SHARE} you specified.

Not sure if this is possible to include in the STD OUT after success, but would be a nice touch to an otherwise excellent solution.

1 Like

That should be possible. I'll tackle it shortly.

1 Like

Done. New version pushed this AM with improvements to stdout along these lines:

JSON response from http://htpc6:9000/api/stacks?type=2&method=string&endpointId=2:
{"Id":131,"Name":"channels-dvr","Type":2,"EndpointId":2,"SwarmId":"","EntryPoint":"docker-compose.yml","Env":[{"name":"TAG","value":"tve"},{"name":"HOST_PORT","value":"8089"},{"name":"CHANNELS_PORT","value":"8089"},{"name":"TZ","value":"US/Mountain"},{"name":"HOST_DIR","value":"/data"},{"name":"DVR_SHARE","value":"/mnt/dvr"},{"name":"DVR_CONTAINER_DIR","value":"/shares/DVR"},{"name":"NETWORK_MODE","value":"host"}],"ResourceControl":{"Id":108,"ResourceId":"2_channels-dvr","SubResourceIds":[],"Type":6,"UserAccesses":[],"TeamAccesses":[],"Public":false,"AdministratorsOnly":true,"System":false},"Status":1,"ProjectPath":"/data/compose/131","CreationDate":1726494878,"CreatedBy":"admin","UpdateDate":0,"UpdatedBy":"","AdditionalFiles":null,"AutoUpdate":null,"Option":null,"GitConfig":null,"FromAppTemplate":false,"Namespace":"","IsComposeFormat":false}
true
A new stack, named channels-dvr has been created in Portainer at http://htpc6:9000 or https://htpc6:9443
You can now access your new Channels DVR container at http://htpc6:8089 (if bridge network), or http://htpc6:8089 (if host network).
Setup Channels DVR to use this container directory /shares/DVR (case sensitive) for storing recordings, since that is mapped to the host directory /mnt/dvr you specified.

Also, adding a digit to "channels-dvr" to support deploying multiple CDVR servers on a single Docker host, is now a series of choices rather than a free form field entry.

VERY NICE!

I tested some combinations and they work fine on my Synology NAS.



And this may be some good news for Windows users, being able to use host mode network to run Channels DVR Server containers.

And looking at their release notes, it appears this is available on Windows, Mac and Linux

1 Like

OK. This has me feeling like a IDIOT! I have no clue what to do. I am am trying linux again (Last time I used linux on regular would of been 2005ish).

  1. I installed ubuntu
  2. I Installed docker
  3. I installed Olive Tin via *.deb package
  4. Olive tin shows up in webbrowser. Does not show up in portainer (Probably because I installed by package)
  5. Created a token and copied. Now that do I do with it.
  6. WTF do I do now to setup project 1 click. There is a envirorment variable you list. Where am I supposed to create that file. I am frustrated. I am sure its completely obvious and I am just missing it. But what do I do next

ive somewhat scrolled the 200 comments. I searched comments for installation. I am not seeing it.

OliveTin-for-Channels is a very specialized version of the generic OliveTin project (which is what you installed).

Your steps 1 and 2 are correct, but you went off the tracks after that. The OliveTin-for-Channels Docker Compose, and sample environment variables are in a number of places on the forum, including Post #1 in this thread.

Maybe this video from earlier in the thread would be useful as well.

2 Likes

Oh. . . Yup. I didnt relize different versions of olivetin. I think i got frustrated after that, frustrated Jake is not rational jake.

1 Like

You'll probably want to uninstall the generic deb package version -- so it doesn't conflict...