-
-
Notifications
You must be signed in to change notification settings - Fork 679
Closed
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem?
The current tutorial uses a one liner for the postCreateCommand
(https://ddev.readthedocs.io/en/latest/users/install/ddev-installation/#github-codespaces):
"postCreateCommand": "bash -c 'ddev config global --omit-containers=ddev-router && ddev config --auto && ddev debug download-images'"
My current experience is that
- a)
ddev config --auto
is not necessary when projects are already configured - b) an external script is used by many people since you can add more commands there
- c)
ddev poweroff
is necessary for rebuilds, because codespaces keeps some docker containers, see docs: codespaces - provide official postCreateCommand script for ddev projects? #5071 (comment)
Describe your solution
Solution which I use currently (e.g. https://github.com/mandrasch/ddev-craftcms-vite):
"postCreateCommand": "chmod +x .devcontainer/setup_project.sh && .devcontainer/setup_project.sh"
#!/bin/bash
set -ex
ddev config global --omit-containers=ddev-router
ddev debug download-images
# catch rebuilds
ddev poweroff
# start ddev project
ddev start -y
# normal project setup
ddev composer install
Describe alternatives
No response
Additional context
I'm happy to provide a PR as well, did not want to complicate things in the other, previous PRs.