-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it available for Docker Swarm? #6
Comments
Thanks for raising this issue. I was tangentially aware of it, but as I rarely use swarm myself I kind of forgot about it. From what I understand, stopping a container in swarm will make swarm mode deploy a replacement instantly as you describe, so that won't work. How would a command that start/stops a service look like when running in swarm mode? I think it might be possible to issue a different command in case the setup is running in swarm mode, so we might be able to work around this. |
Hi,
i specify some options that are not mandatory (like the docker-compose file) but useful. So maybe it would be very nice to be able to choose the service name (mandatory) and provide some options to start the service (optional) through the shell. Unfortunately my skills are not enough good to help to translate this command in shell. and to stop: thanks! |
I looked into this a bit further and one question came up: what happens (in case you can) if you set your service's Maybe this is all you need to do to stop swarm from recreating the container instantly? |
Hi, But actually i cannot start it again with docker start... since we are in the swarm mode, i need to stop /start services and not individual containers (since, from my understand, a service can have several containers) So to make it work, i think there are 2 options: Maybe, would it be possible to enable an option for swarm mode and then instead of taking the containers id, we would take the services id and then start/stop with the appropriate commands? |
I think the following approach should work for us here:
Do you think that should work? |
Yes that would be perfect, thanks a lot! Since i'm here, i'm experiencing a new problem while trying to test it in production. Maybe do you have any idea how to solve this?
it seems related to this: minio/mc#3421 that the MinIO server is not available yet when starting the container. |
Is the MinIO server part of the same stack? |
i'm sorry i'm not an expert in this, but i'm just using your image and no other container is related to MinIO. |
The problem is not related to the
|
Could it be that your Docker version is slightly outdated and you are running into this issue: docker/compose#2854 which would mean your access keys are inadvertently quoted? You can test this easily by defining it like this:
instead of:
|
Swarm is now supported in If you need help on that other issue ( |
Hi, yes very good hint, it was totally this! Actually i have the same and the last version of Docker both on my computer and on my vps but it's not working with "" on VPS... and after checking it's not working for all env vars defined in en .env file...weird, but anyway, i have to check this; must be something else. For Swarm, thanks a lot for your quick release, really nice. I just experienced an issue when it was time to restart service.
From what i see in the error of service update, the error seems to come from this line: Thanks again for your excellent work! |
Yeah it was indeed taking more than one service name at a time because the expression is quoted (I only tested against a setup with one service with multiple replicas where it makes no difference...). This is fixed in v1.6.1 https://github.com/offen/docker-volume-backup/releases/tag/v1.6.1 |
thanks a lot, it works! |
Hello,
first of all, thanks a lot for your work, seems very nice!
i would like to know if your image could work for a docker swarm architecture?
In my case, i have only one node (one vps) and only one replica of each container (php, mysql,...) but instead of starting/stopping independent containers i need to start/stop a service.
and i tried manually to stop one container (docker stop) but the service restarts it automatically just after (so i can't backup right now with your solution).
Do i need to change something in my docker compose or is it possible to modify your script to stop and start a whole service?
Thanks a lot
The text was updated successfully, but these errors were encountered: