first thing, thanks for doing this write up, been using docker-compose for years and its great to get new users onto it, as it has its place in unraid to create more complex stacks.
Appreciate this might be a long shot, but for the life of me can i get "user scripts" plugin to execute a docker-compose commands, just says command not found each blooming time.
How do you get your docker-compose containers to start on array start is it even possible in unraid?
I have to manually do docker-compose down
when the array has rebooted (say in event of power outage or i forgot to do this before i shut the server down. then I have to docker-compose up -d
each time it starts, pain in the neck.
I have created a few docker-compose user scripts, very basic which basically down/up depending on array status. But as i said above, it just fails with the following:
Script location: /tmp/user.scripts/tmpScripts/test compose/script
Note that closing this window will abort the execution of this script
Changed to appdata directory
sudo: docker-compose: command not found
Script looks as follows:
#!/bin/bash
##Bring up Proxy manager
cd /mnt/user/appdata
echo "Changed to appdata directory"
sudo docker-compose up
If I just create this as a, for example testscript.sh and stick it in my appdata directory, and then do sh testscript.sh
runs with no issues as you'd expect. really odd!
If there is a way to do this, it would ace to have a guide for this, as I googled this for months and have not been able to find anything.