最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to restart a single DDEV service (docker container) without restarting the full DDEV project? - Stack Overflow

programmeradmin6浏览0评论

When working with DDEV projects, sometimes one of the services (web, db, or a custom service) gets stuck and we need to restart it. But I can't find a way to restart a specific service only using ddev command.

Yes, I can use a docker command like docker restart ddev-[projectname]-db but a ddev command without the need to type the project name would be much more convenient.

When working with DDEV projects, sometimes one of the services (web, db, or a custom service) gets stuck and we need to restart it. But I can't find a way to restart a specific service only using ddev command.

Yes, I can use a docker command like docker restart ddev-[projectname]-db but a ddev command without the need to type the project name would be much more convenient.

Share Improve this question asked Mar 20 at 10:44 MurzMurz 2092 silver badges10 bronze badges 1
  • At the moment we don't have such a command, but we can probably improve the ddev debug rebuild to do that ddev.readthedocs.io/en/stable/users/usage/commands/… Please open a feature request in github/ddev/ddev/issues – stasadev Commented Mar 20 at 12:09
Add a comment  | 

1 Answer 1

Reset to default 1

In general, we don't provide a way to restart a single container because it can lead to hard-to-diagnose problems. Doing ddev start (instead of ddev restart ) will sometimes do what you want.

Running docker restart ddev-<projectname>-<service> may get you what you want.

And ~/.ddev/bin/docker-compose -f .ddev/.ddev-docker-compose-full.yaml up <servicename> may work for you.

I recommend that you try to figure out why the service has gotten "stuck" and what that means, and try to make it so it doesn't happen. We're happy to help in the DDEV Discord.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论