Skip to content
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

Host shell commands (custom commands) should not auto-start a project #2688

Closed
rfay opened this issue Dec 11, 2020 · 6 comments
Closed

Host shell commands (custom commands) should not auto-start a project #2688

rfay opened this issue Dec 11, 2020 · 6 comments
Milestone

Comments

@rfay
Copy link
Member

rfay commented Dec 11, 2020

Describe the bug

Custom shell commands currently start the project they're in if it's not already started. This makes sense for web commands, but not so much for host commands.

To Reproduce

With a project stopped, issue a command that is a host command. It will start the project.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Version and configuration information (please complete the following information):

  • Host computer OS and Version: [e.g. Windows 10, macOS Catalina]
  • Docker Desktop version if on macOS or Windows (from "About Docker Desktop")
  • ddev version information (use ddev version)
  • config.yaml contents for the misbehaving project
  • Do you have any custom configuration (nginx, php, mysql) in the .ddev folder? If so, have you tried without them?

Additional context
Add any other context about the problem here. Thanks!

@chellman
Copy link
Contributor

You mentioned ddev launch is a host command, and it does make sense that it would start the project. So presumably the solution there is to have ddev start as part of the implementation thereof? Basically any host command that should start the project, should have ddev start in it?

@dkd-kaehm
Copy link

@rfay A little addition: "any command" triggers the "pre-start" hook.

@rfay
Copy link
Member Author

rfay commented Mar 4, 2021

No, ddev list doesn't, ddev stop doesn't. ddev config doesn't. Any script-based command (custom command) will trigger start if it the project is not running. It does not do so if the project is already running.

It's just a feature of script-based commands that they do the ddev start - it's not that they trigger the pre-start hook. It's that they do a start and that triggers the pre-start hook.

@dkd-kaehm
Copy link

dkd-kaehm commented Mar 5, 2021

No, ddev list doesn't, ddev stop doesn't. ddev config doesn't. Any script-based command (custom command) will trigger start if it the project is not running. It does not do so if the project is already running.

It's just a feature of script-based commands that they do the ddev start - it's not that they trigger the pre-start hook. It's that they do a start and that triggers the pre-start hook.

I mean each custom command triggering start/pre-start hook, even ddev is up and running.

@PeterSchuhmannNetflow
Copy link

any news on that topic? I am also very interested in a solution. i want to use to generate ddev config upfront before starting the project and do some validation.

@rfay rfay added this to the v1.22.5 milestone Oct 27, 2023
@rfay rfay modified the milestones: v1.22.5, v1.22.6 Nov 18, 2023
@rfay
Copy link
Member Author

rfay commented Dec 3, 2023

I am working on this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants