Hardlimit

Single button press to start or stop a Portainer docker stack


Listen Later

A Portainer stack (related group of Docker containers) can be started and stopped remotely with the literal push of a button on a Stream Deck. Or you could create a desktop icon that does the same thing. There are many ways to do this as long as a script file can be triggered by a button, icon, or even a Home Assistant automation.

I've found this very useful for Docker services that I don't want running 24/7, but I want to start them up quickly, do what I need to do, and stop them again. I also have two stacks that require a full restart after any container has been updated, and this is how I achieve that restart quickly (I use WUD instead of Portainer for my container updates).

The video shows how it works, what the script files look like, and also the steps required to set it up using Elgato Bitfocus for the Stream Deck. Any other Stream Deck software should be able to achieve the same thing.

CHAPTERS:

Intro 00:00

Stream Deck app demo 01:23
Overview of script files 04:02
Overview of Bitfocus components 05:35
Status script file 06:58
Control script file 09:43
Finding Portainer stack ID 11:52
Bitfocus Custom Variable 12:56
Bitfocus Trigger 14:24
Bitfocus Button Actions 16:21
Bitfocus Button Feedback 19:49
Testing new button 20:59
Access Portainer remotely 22:05
Homepage Status Widget 24:51
Widget config 27:15
My other use cases 28:33
Outro 30:52

LINKS:

Container_status.sh file https://github.com/Danie10/yaml-snippets/blob/main/portainerstack_status.sh

Container_control.sh file https://github.com/Danie10/yaml-snippets/blob/main/portainerstack_control.sh
Nginx Proxy Manager code https://github.com/Danie10/yaml-snippets/blob/main/portainerstack_NPM.txt
Homepage widget code https://github.com/Danie10/yaml-snippets/blob/main/portainer_homepage.yaml

FOLLOW ME:

My daily tech blog at https://gadgeteer.co.za/blog

I post to all these social networks at https://gadgeteer.co.za/social-networks-i-post-to/
Videos are posted to YouTube at https://www.youtube.com/@GadgeteerZA and Peertube at https://video.hardlimit.com/c/gadgeteerza/videos

Thumbnail image credit: Google Gemini

#technology #docker #portainer #streamdeck

...more
View all episodesView all episodes
Download on the App Store

HardlimitBy