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.
1 Answer
Reset to default 1In 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.
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