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

Bindings that look like this: adbtuner_config:/app/.config (with no slash) are docker volumes, and need to be defined in the volumes: section of a docker-compose. These are managed by Docker.

Bindings that look like this: /adbtuner_config:/app/.config (with a slash) are directory mappings, and are mapped to that exact directory on the docker host. These are not managed by Docker.

Some OS's don't allow new directories at the / level, and need to mapped a level down. Synology, for example, needs /volume1/data rather than just /data -- due to OS restrictions.

1 Like

OK - that was the nudge i needed - all set!

One suggestion for your olivetin stack script - might suggest commenting out the 2nd DVR / DVR2 share lines, so that the vast majority only need cut/paste (similar to your external volume add-on).

Good suggestion -- I'll fix that now. What directory did you end up using for your HOST_DIR value?

1 Like

I created a directory /Users/myusername/data and set to that

You and ChatGPT were thinking alike -- that was the suggestion there for the Mac. :slight_smile:

@bnhf good stuff that you guys just added and I want to add Create a Chrome-Capture-for-Channels Stack in Portainert and getting exit status 3

The outlier is that I am not using docker desktop for Mac, I'm using something better. using Orbstack which is much gooder than docker:

anywho, here is the output from olive tin:

Summary
 Create a Chrome-Capture-for-Channels Stack in Portainer
stdout
(empty)
stderr
exit status 3

+ dvr=192.168.1.30:8089
++ basename /config/cc4c.sh
+ extension=cc4c.sh
+ extension=cc4c
+ cp /config/cc4c.env /tmp
+ envFile=/tmp/cc4c.env
+ envVars=("TAG=$2" "HOST_PORT=$3" "HOST_VNC_PORT=$4" "VIDEO=$5" "AUDIO=$6" "TZ=$7" "HOST_VOLUME=$8")
+ printf '%s\n' TAG=latest HOST_PORT=5589 HOST_VNC_PORT=5900 VIDEO=9500000 AUDIO=192000 TZ=US/Mountain HOST_VOLUME=cc4c_config
+ sed -i /=#/d /tmp/cc4c.env
+ /config/portainerstack.sh cc4c
+ stackName=cc4c
+ portainerHost=
+ curl -s -o /dev/null http://:9000
+ portainerURL='https://:9443/api/stacks?type=2&method=string&endpointId=2'
+ portainerToken=
+ cp /config/cc4c.yaml /tmp
+ stackFile=/tmp/cc4c.yaml
+ envFile=/tmp/cc4c.env
++ grep DVR_SHARE= /tmp/cc4c.env
++ grep -v /
++ awk -F= '{print $2}'
+ dockerVolume=
++ grep VOL_EXTERNAL= /tmp/cc4c.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeExternal=
++ grep VOL_NAME= /tmp/cc4c.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeName=
+ [[ -n '' ]]
++ awk '{printf "%s\\n", $0}' /tmp/cc4c.yaml
++ sed 's/"/\\"/g'
+ stackContent='version: '\''3.9'\''\nservices:\n  cc4c:\n    image: fancybits/chrome-capture-for-channels:${TAG}\n    container_name: cc4c\n    command:\n      - sh \n      - -c \n      - |\n        Xvfb :99 -screen 0 1920x1080x16 &\n        x11vnc -display :99 -forever &\n        sed -i '\''/videoBitsPerSecond/c\        videoBitsPerSecond: process.env.VIDEO,'\'' main.js;\n        sed -i '\''/audioBitsPerSecond/c\        audioBitsPerSecond: process.env.AUDIO,'\'' main.js;\n        exec node main.js\n    #devices:\n      #- /dev/dri:/dev/dri # Uncomment for Intel Quick Sync (GPU) access\n    ports:\n      - ${HOST_PORT}:5589 # cc4c proxy port\n      - ${HOST_VNC_PORT}:5900 # VNC port for entering credentials\n    environment:\n      - VIDEO=${VIDEO}\n      - AUDIO=${AUDIO}\n      - TZ=${TZ} # Add your timezone in the Environment variables section with \"name\" set to TZ and \"value\" to your local timezone\n    volumes:\n      - cc4c:/home/chrome # Creates persistent Docker Volume in /var/lib/docker/volumes for Chrome data and main.js\n    restart: unless-stopped\nvolumes:\n  cc4c:\n    name: ${HOST_VOLUME}\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": "5589"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "5589"},{"name": "HOST_VNC_PORT", "value": "5900"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "5589"},{"name": "HOST_VNC_PORT", "value": "5900"},{"name": "VIDEO", "value": "9500000"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "5589"},{"name": "HOST_VNC_PORT", "value": "5900"},{"name": "VIDEO", "value": "9500000"},{"name": "AUDIO", "value": "192000"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "5589"},{"name": "HOST_VNC_PORT", "value": "5900"},{"name": "VIDEO", "value": "9500000"},{"name": "AUDIO", "value": "192000"},{"name": "TZ", "value": "US/Mountain"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "5589"},{"name": "HOST_VNC_PORT", "value": "5900"},{"name": "VIDEO", "value": "9500000"},{"name": "AUDIO", "value": "192000"},{"name": "TZ", "value": "US/Mountain"},{"name": "HOST_VOLUME", "value": "cc4c_config"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "5589"},{"name": "HOST_VNC_PORT", "value": "5900"},{"name": "VIDEO", "value": "9500000"},{"name": "AUDIO", "value": "192000"},{"name": "TZ", "value": "US/Mountain"},{"name": "HOST_VOLUME", "value": "cc4c_config"}]'
++ cat
+ stackJSON='{
  "Name": "cc4c",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  cc4c:\n    image: fancybits/chrome-capture-for-channels:${TAG}\n    container_name: cc4c\n    command:\n      - sh \n      - -c \n      - |\n        Xvfb :99 -screen 0 1920x1080x16 &\n        x11vnc -display :99 -forever &\n        sed -i '\''/videoBitsPerSecond/c\        videoBitsPerSecond: process.env.VIDEO,'\'' main.js;\n        sed -i '\''/audioBitsPerSecond/c\        audioBitsPerSecond: process.env.AUDIO,'\'' main.js;\n        exec node main.js\n    #devices:\n      #- /dev/dri:/dev/dri # Uncomment for Intel Quick Sync (GPU) access\n    ports:\n      - ${HOST_PORT}:5589 # cc4c proxy port\n      - ${HOST_VNC_PORT}:5900 # VNC port for entering credentials\n    environment:\n      - VIDEO=${VIDEO}\n      - AUDIO=${AUDIO}\n      - TZ=${TZ} # Add your timezone in the Environment variables section with \"name\" set to TZ and \"value\" to your local timezone\n    volumes:\n      - cc4c:/home/chrome # Creates persistent Docker Volume in /var/lib/docker/volumes for Chrome data and main.js\n    restart: unless-stopped\nvolumes:\n  cc4c:\n    name: ${HOST_VOLUME}\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": "5589"},{"name": "HOST_VNC_PORT", "value": "5900"},{"name": "VIDEO", "value": "9500000"},{"name": "AUDIO", "value": "192000"},{"name": "TZ", "value": "US/Mountain"},{"name": "HOST_VOLUME", "value": "cc4c_config"}]
}'
+ curl -k -X POST -H 'Content-Type: application/json' -H 'X-API-Key: ' -d '{
  "Name": "cc4c",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  cc4c:\n    image: fancybits/chrome-capture-for-channels:${TAG}\n    container_name: cc4c\n    command:\n      - sh \n      - -c \n      - |\n        Xvfb :99 -screen 0 1920x1080x16 &\n        x11vnc -display :99 -forever &\n        sed -i '\''/videoBitsPerSecond/c\        videoBitsPerSecond: process.env.VIDEO,'\'' main.js;\n        sed -i '\''/audioBitsPerSecond/c\        audioBitsPerSecond: process.env.AUDIO,'\'' main.js;\n        exec node main.js\n    #devices:\n      #- /dev/dri:/dev/dri # Uncomment for Intel Quick Sync (GPU) access\n    ports:\n      - ${HOST_PORT}:5589 # cc4c proxy port\n      - ${HOST_VNC_PORT}:5900 # VNC port for entering credentials\n    environment:\n      - VIDEO=${VIDEO}\n      - AUDIO=${AUDIO}\n      - TZ=${TZ} # Add your timezone in the Environment variables section with \"name\" set to TZ and \"value\" to your local timezone\n    volumes:\n      - cc4c:/home/chrome # Creates persistent Docker Volume in /var/lib/docker/volumes for Chrome data and main.js\n    restart: unless-stopped\nvolumes:\n  cc4c:\n    name: ${HOST_VOLUME}\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": "5589"},{"name": "HOST_VNC_PORT", "value": "5900"},{"name": "VIDEO", "value": "9500000"},{"name": "AUDIO", "value": "192000"},{"name": "TZ", "value": "US/Mountain"},{"name": "HOST_VOLUME", "value": "cc4c_config"}]
}' 'https://:9443/api/stacks?type=2&method=string&endpointId=2'
curl: (3) URL using bad/illegal format or missing URL

anything that stands out to you that you might tweak in order for it to work with orbstack? or maybe its something different or something else on my end.

thanks.

1 Like

You need to select a choice from any dropdown in OliveTin -- nothing can be blank. Otherwise, you'll see the above.

1 Like

yeah - deleted my post as i spotted that first.

Something is still off, though - i can't get the scripts to create source to work - they just hang for me

2024-03-30 13:12:55 level="info" msg="Before Parse Args" cmd="/config/pluto-for-channels.sh \"{{ dvr }}\" \"{{ TAG }}\" \"{{ HOST_PORT }}\" \"{{ PLUTO_PORT }}\" \"{{ PLUTO_CODE }}\" \"{{ CDVR_STARTING_CHANNEL }}\""
2024-03-30 13:12:55 level="info" msg="After Parse Args" cmd="/config/pluto-for-channels.sh \"myrealhostname:8089\" \"latest\" \"7780\" \"7777\" \"local,us_east\" \"4500\""
2024-03-30 13:12:55 level="info" msg="Action starting" timeout="40" title="Create a Pluto-for-Channels Stack in Portainer + CDVR Custom Channels"

...and nothing ever comes back. Tried on a couple of sources too.

Are you getting anything in stdout or stderr if you wait for the timeout? It's set to 40 seconds, but it's probably more like 80 seconds in reality.

1 Like

They don't even show up as entries in the logs tab on olivetin - I'm only grabbing the above snippet from the docker container.

1 Like

Weird. If you exec into the container, using the Portainer "Quick Actions" button for that purpose, are you seeing a whole bunch of scripts in /config?

Post the results of ls -la /config here please.

1 Like
total 604
drwxr-xr-x 111 root root  3552 Mar 30 13:00 .
drwxr-xr-x   1 root root  4096 Mar 30 12:22 ..
-rwxr-xr-x   1 root root    73 Mar 30 12:22 adbtuner.env
-rwxr-xr-x   1 root root  1205 Mar 30 12:22 adbtuner.sh
-rwxr-xr-x   1 root root   861 Mar 30 12:22 adbtuner.yaml
-rwxr-xr-x   1 root root   550 Mar 30 12:22 ah4c.env
-rwxr-xr-x   1 root root  1683 Mar 30 12:22 ah4c.sh
-rwxr-xr-x   1 root root  3715 Mar 30 12:22 ah4c.yaml
-rwxr-xr-x   1 root root   111 Mar 30 12:22 cc4c.env
-rwxr-xr-x   1 root root   353 Mar 30 12:22 cc4c.sh
-rwxr-xr-x   1 root root  1213 Mar 30 12:22 cc4c.yaml
-rwxr-xr-x   1 root root   348 Mar 30 12:22 ccextractor.sh
-rwxr-xr-x   1 root root 11244 Mar 30 12:22 cdvr_movie_library_to_csv.py
-rwxr-xr-x   1 root root   381 Mar 30 12:22 cdvr_movie_library_to_csv.sh
-rw-------   1 root root 18082 Mar 30 12:59 channels_dvr_channel_list_20240330_125939.csv
-rwxr-xr-x   1 root root 36373 Mar 30 12:22 channels_dvr_monitor_channels.py
-rwxr-xr-x   1 root root  4137 Mar 30 12:22 channels_dvr_monitor_channels.sh
-rwxr-xr-x   1 root root 13735 Mar 30 12:22 channels_to_csv.py
-rwxr-xr-x   1 root root   377 Mar 30 12:22 channels_to_csv.sh
-rwxr-xr-x   1 root root   881 Mar 30 12:22 channels_to_csv_awk.sh
-rwxr-xr-x   1 root root   110 Mar 30 12:22 comskipignore.sh
-rwxr-xr-x   1 root root  2555 Mar 30 12:22 comskipini.sh
-rwxr-xr-x   1 root root 63618 Mar 30 12:22 config.yaml
drwxr-xr-x   2 root root    64 Mar 30 12:19 data
-rwxr-xr-x   1 root root  1383 Mar 30 12:22 deletelogs.sh
-rwxr-xr-x   1 root root   145 Mar 30 12:22 dockercompose.sh
-rwxr-xr-x   1 root root   733 Mar 30 12:22 edlstrip.sh
-rwxr-xr-x   1 root root   519 Mar 30 12:22 eplustv.env
-rwxr-xr-x   1 root root  1595 Mar 30 12:22 eplustv.sh
-rwxr-xr-x   1 root root  3038 Mar 30 12:22 eplustv.yaml
-rwxr-xr-x   1 root root   417 Mar 30 12:22 fifopipe_containerside.sh
-rwxr-xr-x   1 root root  1850 Mar 30 12:22 fifopipe_hostside.sh
-rwxr-xr-x   1 root root    72 Mar 30 12:22 filebot.env
-rwxr-xr-x   1 root root   354 Mar 30 12:22 filebot.sh
-rwxr-xr-x   1 root root   843 Mar 30 12:22 filebot.yaml
-rwxr-xr-x   1 root root   770 Mar 30 12:22 fix_thumbnails.rb
-rwxr-xr-x   1 root root   968 Mar 30 12:22 fix_thumbnails.sh
-rwxr-xr-x   1 root root  4288 Mar 30 12:22 foreground.sh
-rwxr-xr-x   1 root root   126 Mar 30 12:22 frndlytv-for-channels.env
-rwxr-xr-x   1 root root  2013 Mar 30 12:22 frndlytv-for-channels.sh
-rwxr-xr-x   1 root root   909 Mar 30 12:22 frndlytv-for-channels.yaml
-rwxr-xr-x   1 root root  4884 Mar 30 12:22 generatem3u.sh
-rwxr-xr-x   1 root root  6815 Mar 30 12:22 healthcheck.sh
-rwxr-xr-x   1 root root   814 Mar 30 12:22 healthcheck_stack.sh
-rwxr-xr-x   1 root root  5539 Mar 30 12:22 healthcheck_wsl.sh
-rwxr-xr-x   1 root root  4321 Mar 30 12:22 ical_2_xmltv.py
-rwxr-xr-x   1 root root  1013 Mar 30 12:22 ical_2_xmltv.sh
-rw-r--r--   1 root root    36 Mar 30 12:19 installation-id.txt
-rwxr-xr-x   1 root root   408 Mar 30 12:22 listcomskipignore.sh
-rwxr-xr-x   1 root root  1055 Mar 30 12:22 llc2metadata.sh
-rwxr-xr-x   1 root root   879 Mar 30 12:22 logfilter.sh
-rwxr-xr-x   1 root root  1414 Mar 30 12:22 manualrecordings.sh
-rwxr-xr-x   1 root root   741 Mar 30 12:22 markforrerecord.sh
-rwxr-xr-x   1 root root   642 Mar 30 12:22 marknocommercials.sh
-rwxr-xr-x   1 root root    72 Mar 30 12:22 mediainfo.env
-rwxr-xr-x   1 root root   354 Mar 30 12:22 mediainfo.sh
-rwxr-xr-x   1 root root   924 Mar 30 12:22 mediainfo.yaml
-rwxr-xr-x   1 root root   436 Mar 30 12:22 mlb.tv-for-channels.env
-rwxr-xr-x   1 root root  1304 Mar 30 12:22 mlb.tv-for-channels.sh
-rwxr-xr-x   1 root root  3819 Mar 30 12:22 mlb.tv-for-channels.yaml
-rwxr-xr-x   1 root root   475 Mar 30 12:22 notifications.sh
-rwxr-xr-x   1 root root   312 Mar 30 12:22 olivetin-for-channels.env
-rwxr-xr-x   1 root root  2146 Mar 30 12:22 olivetin-for-channels.yaml
-rwxr-xr-x   1 root root    54 Mar 30 12:22 organizr.env
-rwxr-xr-x   1 root root   300 Mar 30 12:22 organizr.sh
-rwxr-xr-x   1 root root   466 Mar 30 12:22 organizr.yaml
-rwxr-xr-x   1 root root   826 Mar 30 12:22 pingcdvr.sh
-rwxr-xr-x   1 root root  1366 Mar 30 12:22 playonedl.sh
-rwxr-xr-x   1 root root    41 Mar 30 12:22 plex-for-channels.env
-rwxr-xr-x   1 root root  1343 Mar 30 12:22 plex-for-channels.sh
-rwxr-xr-x   1 root root   606 Mar 30 12:22 plex-for-channels.yaml
-rwxr-xr-x   1 root root  1801 Mar 30 12:22 plexiptv.sh
-rwxr-xr-x   1 root root  2313 Mar 30 12:22 plextoken.sh
-rwxr-xr-x   1 root root    81 Mar 30 12:22 pluto-for-channels.env
-rwxr-xr-x   1 root root  1356 Mar 30 12:22 pluto-for-channels.sh
-rwxr-xr-x   1 root root   933 Mar 30 12:22 pluto-for-channels.yaml
-rwxr-xr-x   1 root root    26 Mar 30 12:22 pluto.env
-rwxr-xr-x   1 root root   217 Mar 30 12:22 pluto.sh
-rwxr-xr-x   1 root root   521 Mar 30 12:22 pluto.yaml
-rwxr-xr-x   1 root root  1469 Mar 30 12:22 portainerstack.sh
-rwxr-xr-x   1 root root   142 Mar 30 12:22 removecomskipignore.sh
-rwxr-xr-x   1 root root   374 Mar 30 12:22 restartshutdown.sh
-rw-r--r--   1 root root 17595 Mar 30 12:59 robsm2mini-8089_channel_list_latest.csv
-rw-r--r--   1 root root  1530 Mar 30 13:00 robsm2mini-8089_healthcheck-olivetin_latest.log
-rwxr-xr-x   1 root root    26 Mar 30 12:22 samsung-tvplus-for-channels.env
-rwxr-xr-x   1 root root  1303 Mar 30 12:22 samsung-tvplus-for-channels.sh
-rwxr-xr-x   1 root root   693 Mar 30 12:22 samsung-tvplus-for-channels.yaml
-rwxr-xr-x   1 root root    88 Mar 30 12:22 scanlocalcontent.sh
-rwxr-xr-x   1 root root   136 Mar 30 12:22 setcomskipignore.sh
-rwxr-xr-x   1 root root   330 Mar 30 12:22 stationid.sh
-rwxr-xr-x   1 root root    26 Mar 30 12:22 stirr-for-channels.env
-rwxr-xr-x   1 root root  1291 Mar 30 12:22 stirr-for-channels.sh
-rwxr-xr-x   1 root root   669 Mar 30 12:22 stirr-for-channels.yaml
-rwxr-xr-x   1 root root   133 Mar 30 12:22 tailscale.env
-rwxr-xr-x   1 root root   269 Mar 30 12:22 tailscale.sh
-rwxr-xr-x   1 root root  1266 Mar 30 12:22 tailscale.yaml
-rwxr-xr-x   1 root root    41 Mar 30 12:22 tubi-for-channels.env
-rwxr-xr-x   1 root root  1299 Mar 30 12:22 tubi-for-channels.sh
-rwxr-xr-x   1 root root   606 Mar 30 12:22 tubi-for-channels.yaml
-rwxr-xr-x   1 root root   119 Mar 30 12:22 vlc-bridge-fubo.env
-rwxr-xr-x   1 root root   265 Mar 30 12:22 vlc-bridge-fubo.sh
-rwxr-xr-x   1 root root   765 Mar 30 12:22 vlc-bridge-fubo.yaml
-rwxr-xr-x   1 root root    41 Mar 30 12:22 vlc-bridge-pbs.env
-rwxr-xr-x   1 root root  1284 Mar 30 12:22 vlc-bridge-pbs.sh
-rwxr-xr-x   1 root root   392 Mar 30 12:22 vlc-bridge-pbs.yaml
-rwxr-xr-x   1 root root    80 Mar 30 12:22 vlc-bridge-uk.env
-rwxr-xr-x   1 root root  1330 Mar 30 12:22 vlc-bridge-uk.sh
-rwxr-xr-x   1 root root   430 Mar 30 12:22 vlc-bridge-uk.yaml
-rwxr-xr-x   1 root root    35 Mar 30 12:22 watchtower.env
-rwxr-xr-x   1 root root   288 Mar 30 12:22 watchtower.sh
-rwxr-xr-x   1 root root   536 Mar 30 12:22 watchtower.yaml
1 Like

Looks like everything's there. Let's see if we can get a better idea of what's happening. From that same exec command prompt run:

/config/pluto-for-channels.sh "myrealhostname:8089" "latest" "7780" "7777" "local,us_east" "4500"

Hopefully there will be some debug output, and if so post it here.

EDIT: Don't use plex-for-channels for testing -- it's slow (about 6 minutes per region before the M3U URL is made available by that container) -- all the others are pretty quick though in my testing.

2 Likes

It looks like it's failing to pass in the hostname - an endless string of:

+ curl -s -o /dev/null http://:7780
+ [[ -n '' ]]
1 Like

I tried pluto and samsung - no worries there

1 Like

Did you add the two new OliveTin env vars, as described at the end of the first post in this thread? PORTAINER_TOKEN and PORTAINER_HOST?

1 Like

yep.

Pasted from the stack editor:

PORTAINER_TOKEN=gobblygook
PORTAINER_HOST=correcthostname

And are they defined in the environment section of the docker-compose like so:

    environment:
      - CHANNELS_DVR=${CHANNELS_DVR} # Add your Channels DVR server in the form hostname:port or ip:port
      - CHANNELS_DVR_ALTERNATES=${CHANNELS_DVR_ALTERNATES} # Space separated list of alternate Channels DVR servers to choose from in the form hostname:port or ip:port
      - CHANNELS_CLIENTS=${CHANNELS_CLIENTS} # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP
      - UPDATE_YAMLS=${UPDATE_YAMLS} # Set this to true to update config.yaml
      - UPDATE_SCRIPTS=${UPDATE_SCRIPTS} # Set this to true to update all included scripts
      - TZ=${TZ} # Add your local timezone in standard linux format. E.G. US/Eastern, US/Central, US/Mountain, US/Pacific, etc
      - PORTAINER_TOKEN=${PORTAINER_TOKEN} # Generate via <username> dropdown (upper right of WebUI), "My account", API tokens
      - PORTAINER_HOST=${PORTAINER_HOST} # Hostname or IP of the Docker host you're running Portainer on.
1 Like

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