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

@hancox So, a few observations from messing around with a borrowed MacBook Pro:

After installing Docker Desktop for Mac, I added the Portainer extension, then went to terminal to run through the steps you described to enable a username. However, docker ps listed no containers running. I tried another Desktop extension I've used before, with the same result.

Makes me wonder if extensions are managed as regular containers, and if not, what was the portainer container you were interacting with? Is it possible you have both the extension and the standard WebUI version installed?

I uninstalled the extension, and went ahead and installed Portainer using the standard command line approach:

docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name portainer \
    --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    cr.portainer.io/portainer/portainer-ce:latest

And, so far, everything has been working as expected. I spun-up OliveTin, and was able to install Watchtower (as a test) using the OliveTin Action for it:

stdout:

{"Id":8,"Name":"watchtower","Type":2,"EndpointId":2,"SwarmId":"","EntryPoint":"docker-compose.yml","Env":[{"name":"TAG","value":"latest"},{"name":"WATCHTOWER_RUN_ONCE","value":"true"}],"ResourceControl":{"Id":3,"ResourceId":"2_watchtower","SubResourceIds":[],"Type":6,"UserAccesses":[],"TeamAccesses":[],"Public":false,"AdministratorsOnly":true,"System":false},"Status":1,"ProjectPath":"/data/compose/8","CreationDate":1711923258,"CreatedBy":"admin","UpdateDate":0,"UpdatedBy":"","AdditionalFiles":null,"AutoUpdate":null,"Option":null,"GitConfig":null,"FromAppTemplate":false,"Namespace":"","IsComposeFormat":false}

The standard post install healthcheck looks good too, though I haven't quite figured out how the Mac version handles Samba shares yet:

Checking your OliveTin installation...
(extended_check=false)

----------------------------------------

Checking that your selected Channels DVR server (media-server6:8089) is reachable by URL:
HTTP Status: 200 indicates success...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1276  100  1276    0     0   4415      0 --:--:-- --:--:-- --:--:--  4400
HTTP Status: 200
Effective URL: http://media-server6:8089/

----------------------------------------

Checking that your selected Channels DVR server's data files (/mnt/media-server6-8089) are accessible:
Folders with the names Database, Images, Imports, Logs, Movies, Streaming and TV should be visible...


----------------------------------------

Here's a list of your current OliveTin-related settings:

CHANNELS_DVR=media-server6:8089
CHANNELS_DVR_ALTERNATES=utheater-pc:8089
CHANNELS_CLIENTS=appletv4k firestick-master
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true

----------------------------------------

Here's the contents of /etc/resolv.conf from inside the container:

search tail[Redacted].ts.net
nameserver 127.0.0.11
options ndots:0

----------------------------------------

Here's the contents of /etc/hosts from inside the container:

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.25.0.3	olivetin

One question that comes to mind is: If you have a particular reason you want to use the Docker Desktop Portainer extension -- or if the full version might not be a better bet?

EDIT: Also, from inside the container I'm able to ping both macbook-pro-6 with responses via Tailscale, and macbook-pro-6.local with responses via the local network.

EDIT2: Got DVR_SHARE working too, at least in my remote share via Tailscale scenario. The SMB share has to be added in Finder (Cmd-K), and then it's available to use as /Volumes/<your-share-name> in the OliveTin docker-compose:

Checking your OliveTin installation...
(extended_check=false)

----------------------------------------

Checking that your selected Channels DVR server (media-server6:8089) is reachable by URL:
HTTP Status: 200 indicates success...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1276  100  1276    0     0   5747      0 --:--:-- --:--:-- --:--:--  5747
HTTP Status: 200
Effective URL: http://media-server6:8089/

----------------------------------------

Checking that your selected Channels DVR server's data files (/mnt/media-server6-8089) are accessible:
Folders with the names Database, Images, Imports, Logs, Movies, Streaming and TV should be visible...

total 188
drwx------ 1 root root 16384 Mar 31 17:13 .
drwxr-xr-x 1 root root  4096 Mar 31 17:36 ..
-rwx------ 1 root root  6148 Mar 31 17:34 .DS_Store
drwx------ 1 root root 16384 Dec 24 11:45 .config
drwx------ 1 root root 16384 Dec 24 03:07 .pki
drwx------ 1 root root 16384 Mar 30 21:03 Database
drwx------ 1 root root 16384 Mar 31 09:30 Images
drwx------ 1 root root 16384 Apr  8  2023 Imports
drwx------ 1 root root 16384 Apr  9  2023 Logs
drwx------ 1 root root 16384 Feb 10 18:55 Movies
drwx------ 1 root root 16384 Dec 15 02:54 PlayOn
drwx------ 1 root root 16384 Mar 31 15:23 Streaming
drwx------ 1 root root 16384 Mar 30 13:30 TV

----------------------------------------

Here's a list of your current OliveTin-related settings:

CHANNELS_DVR=media-server6:8089
CHANNELS_DVR_ALTERNATES=utheater-pc:8089
CHANNELS_CLIENTS=appletv4k firestick-master
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true

----------------------------------------

Here's the contents of /etc/resolv.conf from inside the container:

search tail[Redacted].ts.net
nameserver 127.0.0.11
options ndots:0

----------------------------------------

Here's the contents of /etc/hosts from inside the container:

127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
172.18.0.3	olivetin
1 Like

@hancox I bought a Mac Mini M2, and went through the process of installing Docker Desktop and the WebUI version of Portainer. It was a quick and straightforward process. OliveTin was up-and-running a few minutes after, and I added Watchtower via the OliveTin Action.

The biggest hassle, quite frankly, was figuring out a good way to remote into MacOS from Windows. No RDP support, and Apple's (Screen Sharing) version of VNC server gives one flashbacks to a couple of decades ago. :frowning: Chrome Desktop to the rescue though, with good resolution and performance.

It turns out there's a tick-box for "un-hiding" the Portainer Desktop Extension, and with that checked, one can see the extension has its own stack, container and volume. They both interact with Docker, but not with each other. Conflicts are likely:

I used /Users/<myusername>/data for HOST_DIR, and /Volumes/dvr for DVR_SHARE. /Users and /Volumes are both shared by default in Docker Desktop. Network shares need to be setup in Finder before spinning-up OliveTin. If your CDVR files aren't in one of the standard file shares in Docker Desktop, you'd need to add it.

1 Like

WOW - I hope you didn't just buy an M2 for troubleshooting this! Talk about going above and beyond.

The full portainer install got me 90% there, but i still couldn't add a source successfully (though my host showed up in a health check.

I'm guessing you saw similar, as i put in the newest compose script you published, and it all works now.

Thanks for putting up with me on troubleshooting!

Excellent news!

Actually the newest docker-compose updates were in the interest of making things more bulletproof. It's been bugging me that the volumes definitions in the olivetin service still required some user editing. My goal has been to have everything that's installation specific in the Environment variables area. Sounds like this concept has paid off already.

Not having a MacOS running on bare metal has been something of a limitation to my testing, so I'm happy to have the Mac Mini now. It should speed up my multi-arch container builds as well, as the only ARM platforms in my build cluster have been Raspberry Pis.

It's been useful to go through this process with you, as it revealed important differences between the Docker Desktop Extension version of Portainer, and the full WebUI version. Plus, the whole File Sharing settings part of the Mac version of Docker Desktop doesn't exist in the Windows version.

So, now you have OliveTin up-and-running, and I got a Mac Mini M2 out of the deal. We both came out ahead. :partying_face:

1 Like

Can you help with this if possible? Thanks.

So, you're for sure missing the new PORTAINER_HOST environment variable, and maybe PORTAINER_TOKEN (which you need to create if you haven't already).

I just updated the Portainer-Stack for OliveTin, in the primary places it's posted on the forum, so the new variables required for Project One-Click are present. All of the stacks I'm creating are designed for near-zero editing of the compose itself. Use the Environment variables section of Portainer for your specific values (Advanced mode in that section allows for copy-and-paste):

1 Like

Thanks. I’ll try it out when I get a moment.

Here's a one minute video I did stepping through Project: One-Click for MLB.tv. If this proves useful, I'll do a few more on subjects related to my projects and Channels Extensions in general.

3 Likes

Nice video. Short and straight to the point.

By the way, if this is you speaking in the video, you have a great voice! Very pleasant and soothing.

I would definitely watch more videos from you.

Your video is useful but if you're considering more, could you possibly start from the beginning to show the less technical folks, like myself, how to set everything up?

I've been hesitant to install Docker Desktop on my 16GB M2 Mac Mini because I remember it carved out a large chunk of memory on my PC, and my Mac idles between 40-65% memory usage.

I'm not sure if that's normal for a Mac or if I need to adjust a setting because my 16 GB PC, with more background processes running, idles at around 20% memory usage.

I was thinking along those lines too. A few more short videos covering Docker Desktop, Portainer, OliveTin and probably Organizr. With those, and Project One-Click, everything else one might want to install can be done with OliveTin Actions.

Regarding Docker Desktop on the Mac Mini M2, I just installed the above pieces recently on an 8GB model, and it looks like it's using around 2.75GB with 4 containers. Docker Desktop does allow you to limit resource usage if needed:

I would very much appreciate simple step by step posts or videos for setting up Portainer, Olivetin, Project One-Click, and others previously mentioned in this feed. I have unsuccessfully tried several times to set up Olivetin through Portainer. I think that I'm really struggling to correctly enter environment variables. In particular, properly identifying docker and Channels DVR folders on my Synology NAS.
Cheers to all of you who are doing amazing work on these projects.

1 Like

@bnhf I could not use portainer port 9000 it is in use by java.exe had to use 9001... Will this have an affect on using these Installations.

It will if port 9000 responds to a basic curl, as the scripts will assume http Portainer is there. If there's no response by java.exe, then the scripts will move to using the Portainer https port on 9443.

I could make this configurable if need be -- let me know.

EDIT: It's only these lines in one common script that would need tweaking, and you could actually have 9443 tested first and then switch the && and || assignments for an immediate fix (if needed):

portainerstack.sh:

curl -s -o /dev/null http://$portainerHost:9000 \
  && portainerURL="http://$portainerHost:9000/api/stacks?type=2&method=string&endpointId=2" \
  || portainerURL="https://$portainerHost:9443/api/stacks?type=2&method=string&endpointId=2"

This is what I get when i try to install using port 9000

Microsoft Windows [Version 10.0.19045.4170]
(c) Microsoft Corporation. All rights reserved.

C:\Windows\system32>docker run -d -p 8000:8000 -p 9000:9000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data cr.portainer.io/portainer/portainer-ce:latest
0520ba825fa991678b4bf5254d30fc88060ef050cb985c8c262c1c1f56cbead6
docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:9000 -> 0.0.0.0:0: listen tcp 0.0.0.0:9000: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

C:\Windows\system32>docker run -d -p 8000:8000 -p 9001:9000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data cr.portainer.io/portainer/portainer-ce:latest
ef6d015c39f99b700a17e4d9042e4536b1f304f2b012da513e7772f2d0bd99a1

C:\Windows\system32>

using port 9001 trying to create Tubi ...

@Edwin_Perez

I realize now that all of my tests have been with using a channel number override, and leaving the # in that field is failing. I'll fix that, but if you choose a starting channel number (in place of the "#"), like 12000 or whatever -- it should work.

use channels 3000 this is what happens appeared stuck ...

image

Did you make any changes to that curl test or did you leave it as is?

left it as is .....

level="info" msg="Before Parse Args" cmd="/config/tubi-for-channels.sh \"{{ dvr }}\" \"{{ TAG }}\" \"{{ HOST_PORT }}\" \"{{ TUBI_PORT }}\" \"{{ CDVR_STARTING_CHANNEL }}\""
level="info" msg="After Parse Args" cmd="/config/tubi-for-channels.sh \"192.168.50.68:8089\" \"latest\" \"7778\" \"7777\" \"3000\""
level="info" msg="Action starting" timeout="40" title="Create a Tubi-for-Channels Stack in Portainer + CDVR Custom Channels"
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""
level="info" msg="UserFromContext" usergroup="" username=""

And what happens if you try to curl port 9000 on your docker host? Is there a response?

EDIT: Your also going to need to restart OliveTin, as you're likely in a waiting loop. I need to add some additional tests and error handling to account for this scenario.