etc. depending on what actions I need to do against container I have bash script for that and if I need to perform such action on other container I just copy paste and change name variable. So I pull this repo to my container host and just type ./bin/synapse/stop and I stop synapse.
Have you considered replace the name with input from stdin? So instead of name=synapse you could do name=$1 and have one script to use for all containers.
yeah but I don’t mind having duplicated scripts, it’s just easier to go to single script and don’t have to worry about everything else, I keep them like bin/synapse/run, bin/synapse/stop, bin/synapse/logs etc. What I haven’t figured out is better way to keep all ports in one place instead of ports.md file but on the other hand it’s not like I have thousands of containers running.
captcha_incorrect@lemmy.world 4 weeks ago
How do you manage your containers?
vane@lemmy.world 3 weeks ago
I have a git repo with some directory convention and bash scripts. Ex stop is just
etc. depending on what actions I need to do against container I have bash script for that and if I need to perform such action on other container I just copy paste and change name variable. So I pull this repo to my container host and just type ./bin/synapse/stop and I stop synapse.
Hope that makes sense.
captcha_incorrect@lemmy.world 1 week ago
Have you considered replace the name with input from stdin? So instead of
name=synapseyou could doname=$1and have one script to use for all containers.vane@lemmy.world 1 week ago
yeah but I don’t mind having duplicated scripts, it’s just easier to go to single script and don’t have to worry about everything else, I keep them like
bin/synapse/run,bin/synapse/stop,bin/synapse/logsetc. What I haven’t figured out is better way to keep all ports in one place instead ofports.mdfile but on the other hand it’s not like I have thousands of containers running.