Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in R Programming by (19k points)
I am having some problem in docker compose

I am having a docker-compose.yml file that contains 4 containers: redis, postgres, api, worker

During the development of worker, I often need to restart it in order to apply changes. Is there any good way to restart a container without restarting the other containers?

Can anyone help me with this?

Thanks.

1 Answer

0 votes
by (33.1k points)

You can simply use the following command:

docker-compose restart worker

If you want to set the time to wait for a stop

docker-compose restart -t 30 worker

Hope this answer helps you!

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...