If you already know Docker CLI, is there a reason to use Portainer?
I often see people mention the Portainer project and how it's useful, but I never hear any reason to use it other than as a more user friendly front end to service management.
So is there any particular feature or reason to use portainer over docker's CLI? Or is it simply a method of convenience?
This isn't only strictly for self hosting, but I figure people here would know better.
My main 2 reasons for installing it both come from needing to restart services sometimes:
Portainer let me allow other people access to restarting specific containers that occasionally misbehave
Portainer lets me update and restart all of the containers running in my VPN stack without breaking. For some ungodly reason, even with dependency set and everything in docker-compose, a CLI reboot will basically always start a service or 2 before gluetun is actually advertising it's in a healthy state and everything breaks. With portainer that doesn't happen, with the exact same compose, and I don't get why lol
And then there is me. I had to start my stack 7 times yesterday in portainer. I should really figure out how to set it up right. I had thought setting gluetun to a static IP would get it to launch first. Or adding it to the top of the config. But alas. No go.
Gluetun first in Services, uses the network I set for it and the stack
Everything else goes below it, relying on the gluetun CONTAINER (I plan to have another stack running gluetun for other reasons so having it check the service is a no go for me) to be running in a HEALTHY state
All are set to restart: unless-stopped except gluetun, which is never
The expected behaviour is that containers will always wait for gluetun to report that it's healthy before trying again to restart. Should gluetun fail and crash for any reason it won't reboot and potentially fuck itself up harder, and no services will be able to start because it's not reporting healthy.
This works perfectly in portainer and should when running docker-compose up, but for me it took portainer to work. Saw someone somewhere mention it has some sort of priority handling override built into it that docker itself doesn't, meaning it's less likely to fuck that lind of thing up, but idk how true it is
I'll see if I can remember to snag a couple snips of my YAML to make it more clear
I left in the wireguard stuff without my details because for me Gluetun refused to work when setting the exact same info to wg0.conf, so I define it in my compose
Then, services that rely on gluetun go below and look like:
It worked. Muahaha it worked. Thank you so much. I still have so much to learn. But one click and repulled and redeployed. The only change I needed in my config was to add.
depends_on:
gluetun:
condition: service_healthy
Into each container that was controlled by gluetun
It took me too long to get everything working myself because people love to share shit exclusively in CLI format and look down at anyone who asks for YAML it seems, so I'm always glad to pass it on
(I can understand CLI, but the ADHD brain finds YAML much easier for documentation purposes and it surprises me how many people seem to disagree)