If you use filesystem labels,
Sorry, what do you understand by that. Would you be so kind and post an example. Thanks in advance
If you use filesystem labels,
Sorry, what do you understand by that. Would you be so kind and post an example. Thanks in advance
Sorry, what do you understand by that. Would you be so kind and post an example. Thanks in advance
yes and no
in my case i use symlinks - and name them everytime the same
@Huberer Symlinks is just an plugin you will find in OMV - its like share folders for the local system, so i just link my drives to /media like: /media/ssd/ or media/nas1/ etc. pp. in this way you don't have to type /srv/dev-disk-by-.... all the time - a /media/nas1/ is tipped ways faster, and, i know what it is without thinking about it. its like most thinks in - much ways go to rom
a /media/nas1/ is tipped ways faster
There is autocompletion with TAB
you are absolut right
but only in cli
I know about TABs @macom I work a lot with CLI
But as I saw on different guides for docker-compose some are mixing the paths. Like /srv/dev-disk-by-label/xxx and /sharedfolders/xxx
I read somewhere that paths with /srv/dev-xxx should be more stable than /sharedfolders/xxxx
@draddy
I know what symlinks are but didn't work with it. I also didn't know about the plugin (shame on me).
What I do with my containers and compose-files is to copy them. So when I do a fresh installation, I create the same folder structure again under OMV. Put the compose-files to a special folder, run them to create the container. Stop the container, delete the new one and replace it with the backup. Of course I've to change permissions and owner. With that I don't face any problems.
yeah for me its just a simple way that fit my crazy head.
also for me its more easy to have a network share on my windows is named nas1 - and in cli i use /media/nas1 and i know thats just the same.
also i test alot in my vm - so here i also got /media/ssd what will hold my appdata and thinks like this, so i can just copy my composer files from vm to hardware system and run it.
so everyone have its own way to handle thinks
Sorry, what do you understand by that. Would you be so kind and post an example. Thanks in advance
If you don't label your filesystem, the paths you'll need to use are quite long... /srv/dev-uuid-some-long-ass-number/folder-name
if you label it, your path will be /srv/dev-uuid-label/folder-name.
When you create a filesystem, giving it a "label" is one of the options.. Go to FIlesystems, click create, and you'll see the label option. Now look in the webUI under filesystems, and one of the columns is "Label".
Easy peasy (if you set it up from the beginning)
When you create a filesystem, giving it a "label" is one of the options.. Go to FIlesystems, click create, and you'll see the label option. Now look in the webUI under filesystems, and one of the columns is "Label".
I thought that was required, not optional. I didn't think the filesystems would work without a label. Besides, who wouldn't want an easy to remember label.
I thought that was required, not optional. I didn't think the filesystems would work without a label. Besides, who wouldn't want an easy to remember label.
Not required... but very handy for sure. My data drives do not have labels. It was really just an oversight on my part, but I've considered formatting my drives and adding a label.
Not required... but very handy for sure. My data drives do not have labels. It was really just an oversight on my part, but I've considered formatting my drives and adding a label.
You don't need to format a filesystem to add a label. You can do this anytime for ext2, ext3 and ext4 with e2label.
You don't need to format a filesystem to add a label. You can do this anytime for ext2, ext3 and ext4 with e2label.
How? I tried to do it from the webUI and it doesn't seem to allow this.. never really looked at doing it via command line. I'm assuming I'd have to go through and adjust all my paths in my dockers, but that would be no big deal.
Edit: Hm... i just did a quick Google and it looks like this is fairly painless. can't really believe I never thought of that.
How?
list the label, if prompt is eptpty, you do not have labels
Label /dev/sda1 "system"
In my case, I have to use /dev/sda2
I can't believe I never bothered to Google that (I'd just found the answer prior to your post)...
I'm assuming I'd have to go through and adjust all my paths in my dockers, but that would be no big deal.
Probably not. If your paths were based on by-partuuid or by-uuid those would still be valid.
Probably not. If your paths were based on by-partuuid or by-uuid those would still be valid
Hmm I'll have to take a look at it in a bit (fights are on).
Just wanted to say a big thank you for the detailed how-to! This way I managed to put all my single containers in a unified compose file and I'm now able to deploy all containers in one stack with just one click!
What used to be a lot of manually and tedious work is now automated! Especially helpful for my current situation where I do a lot of testing around OMV5 and Proxmox!
THX!
For automatic backup configuration of runing containers:
#!/bin/sh
# 1. Install git
# sudo apt update
# sudo apt install git
# 2. Optional: change to your docker user folder (mine is "docker1")
# cd /home/docker1
# 3. D/L repo (don't create special folder, git will do it for you)
# sudo git clone https://github.com/Red5d/docker-autocompose.git
# 4. Cnange to created repo folder
# cd home/docker1/docker-autocompose
# 5. Run
# sudo docker build -t red5d/docker-autocompose . (Don't miss dot at the end)
Containers=$(docker ps --no-trunc --format "{{.ID}};{{.Names}}")
Date=$(date +%Y-%m-%d-%H%M)
Path="/home/user/Containers_config/$Date/"
mkdir -p "$Path"
echo "$Containers" | while IFS= read -r line; do
echo "$line" | while IFS=';' read ID Name; do
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose -v 3 "$ID" > "$Path/$Name.yml"
echo "$ID $Name"
done
done
Alles anzeigen
iıs there a way to make oneclik or executable file?
@Wolvverine: Thank you, very helpful!
uaytac: The post is already in bash script form, ready to go. Save it in a file as is and chmod +x. Except you might want to change the output path in line 17 to wherever you want the generated ymls to go.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!