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

Good catch - I must have taken the regular items when i got fed up earlier, and not from this thread. Sorry!

Still hanging though, though the script gets a ton further.

root@olivetin:/config# /config/pluto-for-channels.sh "hostname:8089" "latest" "7780" "7777" "local,us_east" "4500"
+ dvr=hostname:8089
++ basename /config/pluto-for-channels.sh
+ extension=pluto-for-channels.sh
+ extension=pluto-for-channels
+ cp /config/pluto-for-channels.env /tmp
+ envFile=/tmp/pluto-for-channels.env
+ extensionURL=hostname:7780
+ [[ 4500 == \# ]]
+ cdvrStartingChannel=4500
+ [[ -n 4500 ]]
+ cdvrIgnoreM3UNumbers=ignore
+ curl -s -o /dev/null http://hostname:7780
+ envVars=("TAG=$2" "HOST_PORT=$3" "PLUTO_PORT=$4" "PLUTO_CODE=$5" "CDVR_STARTING_CHANNEL=$6")
+ printf '%s\n' TAG=latest HOST_PORT=7780 PLUTO_PORT=7777 PLUTO_CODE=local,us_east CDVR_STARTING_CHANNEL=4500
+ sed -i /=#/d /tmp/pluto-for-channels.env
+ /config/portainerstack.sh pluto-for-channels
+ stackName=pluto-for-channels
+ portainerHost=hostname
+ curl -s -o /dev/null http://hostname:9000
+ portainerURL='https://hostname:9443/api/stacks?type=2&method=string&endpointId=2'
+ portainerToken=correct
+ cp /config/pluto-for-channels.yaml /tmp
+ stackFile=/tmp/pluto-for-channels.yaml
+ envFile=/tmp/pluto-for-channels.env
++ grep DVR_SHARE= /tmp/pluto-for-channels.env
++ grep -v /
++ awk -F= '{print $2}'
+ dockerVolume=
++ grep VOL_EXTERNAL= /tmp/pluto-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeExternal=
++ grep VOL_NAME= /tmp/pluto-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeName=
+ [[ -n '' ]]
++ awk '{printf "%s\\n", $0}' /tmp/pluto-for-channels.yaml
++ sed 's/"/\\"/g'
+ stackContent='version: '\''3.9'\''\nservices:\n  # GitHub home for this project with setup instructions: https://github.com/jgomez177/pluto-for-channels\n  # Docker container home for this project: https://ghcr.io/jgomez177/pluto-for-channels\n  pluto-for-channels:\n    image: ghcr.io/jgomez177/pluto-for-channels:${TAG}\n    container_name: pluto-for-channels\n    ports:\n      - ${HOST_PORT}:${PLUTO_PORT} # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    environment:\n      - PLUTO_PORT=${PLUTO_PORT}\n      - PLUTO_CODE=${PLUTO_CODE} # ALLOWED_COUNTRY_CODES: us_east - United States East Coast, us_west - United States West Coast, local - Local IP address Geolocation, ca - Canada, uk - United Kingdom,\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n'
+ stackEnvVars='['
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},{"name": "CDVR_STARTING_CHANNEL", "value": "4500"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},{"name": "CDVR_STARTING_CHANNEL", "value": "4500"}]'
++ cat
+ stackJSON='{
  "Name": "pluto-for-channels",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  # GitHub home for this project with setup instructions: https://github.com/jgomez177/pluto-for-channels\n  # Docker container home for this project: https://ghcr.io/jgomez177/pluto-for-channels\n  pluto-for-channels:\n    image: ghcr.io/jgomez177/pluto-for-channels:${TAG}\n    container_name: pluto-for-channels\n    ports:\n      - ${HOST_PORT}:${PLUTO_PORT} # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    environment:\n      - PLUTO_PORT=${PLUTO_PORT}\n      - PLUTO_CODE=${PLUTO_CODE} # ALLOWED_COUNTRY_CODES: us_east - United States East Coast, us_west - United States West Coast, local - Local IP address Geolocation, ca - Canada, uk - United Kingdom,\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
  "Env": [{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},{"name": "CDVR_STARTING_CHANNEL", "value": "4500"}]
}'
+ curl -k -X POST -H 'Content-Type: application/json' -H 'X-API-Key: correct=' -d '{
  "Name": "pluto-for-channels",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  # GitHub home for this project with setup instructions: https://github.com/jgomez177/pluto-for-channels\n  # Docker container home for this project: https://ghcr.io/jgomez177/pluto-for-channels\n  pluto-for-channels:\n    image: ghcr.io/jgomez177/pluto-for-channels:${TAG}\n    container_name: pluto-for-channels\n    ports:\n      - ${HOST_PORT}:${PLUTO_PORT} # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    environment:\n      - PLUTO_PORT=${PLUTO_PORT}\n      - PLUTO_CODE=${PLUTO_CODE} # ALLOWED_COUNTRY_CODES: us_east - United States East Coast, us_west - United States West Coast, local - Local IP address Geolocation, ca - Canada, uk - United Kingdom,\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
  "Env": [{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "7780"},{"name": "PLUTO_PORT", "value": "7777"},{"name": "PLUTO_CODE", "value": "local,us_east"},{"name": "CDVR_STARTING_CHANNEL", "value": "4500"}]
}' 'https://hostname:9443/api/stacks?type=2&method=string&endpointId=2'



curl: (28) Failed to connect to hostname port 9443: Connection timed out
1 Like

exec into the container and ping your Portainer hostname (or IP, whichever you're using) please.

EDIT: If you're using hostname, and it won't resolve, switch to using your Mac's IP address.

1 Like

yep - that's hanging too, albeit finding the ip. weird.
root@olivetin:/# ping host
PING host (192.168.50.95) 56(84) bytes of data.

^C
--- host ping statistics ---
50 packets transmitted, 0 received, 100% packet loss, time 50187ms

If you have another computer available, can you ping your Mac from there? And, can you reach https://<hostname or IP of Mac>:9443 from there? Could also be done with the "Network Analyzer" app on iOS or Android.

1 Like

@hancox Also, what did you see in the healthcheck? Anything sensitive is automatically redacted. Here's mine:

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   249k      0 --:--:-- --:--:-- --:--:--  249k
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 12
drwxr-xr-x 2 1000 1000 8192 Dec 31 01:52 .
drwxr-xr-x 1 root root 4096 Mar 27 16:48 ..
drwxr-xr-x 2 1000 1000    0 Dec 24 11:45 .config
drwxr-xr-x 2 1000 1000    0 Dec 24 03:07 .pki
drwxr-xr-x 2 1000 1000    0 Mar 29 21:03 Database
drwxr-xr-x 2 1000 1000    0 Mar 28 22:57 Images
drwxr-xr-x 2 1000 1000    0 Apr  8  2023 Imports
drwxr-xr-x 2 1000 1000    0 Apr  9  2023 Logs
drwxr-xr-x 2 1000 1000    0 Feb 10 18:55 Movies
drwxr-xr-x 2 1000 1000    0 Dec 15 02:54 PlayOn
drwxr-xr-x 2 1000 1000    0 Mar 30 10:41 Streaming
drwxr-xr-x 2 1000 1000    0 Mar 19 16:35 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=false
UPDATE_SCRIPTS=false

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

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.20.0.3	olivetin
1 Like

I can ping my mac from my PC successfully on same hostname.

9443 works from the mac too, as that's what i needed to use for the Portainer front end, to set up the token.

I'm guessing it's the tailscale bits in the way - trying a removal of those

If you're using Tailscale with MagicDNS, your Tailscale domain should be used for the DOMAIN env var in OliveTin.

EDIT: Here's mine from my Windows laptop running Docker Desktop, with Tailscale installed on the laptop, and DOMAIN=tail[Redacted].ts.net

root@olivetin:/# ping convertible-pc3
PING convertible-pc3.tail[Redacted].ts.net (100.[Redacted]) 56(84) bytes of data.
64 bytes from 100.[Redacted] (100.[Redacted]): icmp_seq=1 ttl=63 time=3.29 ms
64 bytes from 100.[Redacted] (100.[Redacted]): icmp_seq=2 ttl=63 time=2.58 ms
64 bytes from 100.[Redacted] (100.[Redacted]): icmp_seq=3 ttl=63 time=3.16 ms
1 Like

Sorry if I wasn't clear earlier - was prepping for game

I was speculating that, on my non-tailscale installation, that the tailscale DNS configs might be at fault. I'll check more tomorrow...

Clearly having trouble making it into the rest of my host, despite the fact i can cut/paste the URL on the same machine into a browser, and no issue.

I'm going to tinker today when i have time

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

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

Checking that your selected Channels DVR server (host: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:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
curl: (28) Connection timed out after 5002 milliseconds
HTTP Status: 000
Effective URL: http://host:8089/

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

Checking that your selected Channels DVR server's data files (/mnt/host-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=host:8089
CHANNELS_DVR_ALTERNATES=
CHANNELS_CLIENTS=MBR tvroom
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true

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

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

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
192.168.32.3	olivetin
1 Like

Yeah - this is def docker desktop laughing at me.

Changing my hostname to this makes pings resolve, but it's going to be a problem making the other parts (like adding sources) work:

CHANNELS_DVR=host.docker.internal:8089

A friend of mine is going to loan me a Mac laptop later today, so hopefully I can tinker with it some here too.

1 Like

There should really be a DNS search domain shown here, which for a home network is typically local, localdomain or some use lan or home. This should be set by Docker, based on the DOMAIN= env var in your OliveTin setup. I wonder why it's not getting set?

1 Like

I had removed those switches earlier for troubleshooting, but i don't think it's search though - the name resolves in the earlier ping, where i would expect it to come up with nothing, if it were truly missing the name.

I re-added, and no change, aside from the healthcheck output matching yours more on that item

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

search local
nameserver 127.0.0.11
options ndots:0

@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.

1 Like

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.

1 Like