I just want to know how to do in my docker-compose to force a service to run on a specific rancher host.
I’ve heard about labels, i’ve applied labels to my nodes but it doesn’t work.
So, when you click a host’s ‘:’ menu and select ‘View in API’ you see:
-labels: {
...
id: "s02",
...
right?
What do you mean by “it doesn’t work?” Does the container end up being started on whatever host?
Additionally, when you select that container’s stack’s ‘:’ menu and click ‘View Config’ do you see your label in it? This will tell you whether your compose file was correctly parsed.
What do you mean by “it doesn’t work?” Does the container end up being started on whatever host?
yes exactly.
Additionally, when you select that container’s stack’s ‘:’ menu and click ‘View Config’ do you see your label in it? This will tell you whether your compose file was correctly parsed.
No i can’t see the label in it. So maybe my compose file is not correctly parsed as u said but i don’t know why.
EDIT : Hmm … finally i can see it in the config of the stack EDIT 2 : Oh god it works with " on the label !