Navigation Menu

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

Use working_dir in generated docker-compose instead of dynamically setting working_dir on launch #3158

Closed
mstrelan opened this issue Aug 12, 2021 · 2 comments

Comments

@mstrelan
Copy link

mstrelan commented Aug 12, 2021

I've been following along with #3130 and https://drupalize.me/blog/debug-any-drupals-phpunit-tests-phpstorm-ddev-local-environment but ran in to an issue when running Drupal Test Traits.

When phpstorm runs the test via docker exec it runs from / instead of /var/www/html and therefore DrupalFinder can't find Drupal. This is because the working directory is dynamically added to the ddev exec commands. Would it be possible to add the working_dir to the docker-compose file instead or as well?

To get around the issue for now I'm adding a custom docker compose file to set this:

.ddev/docker-compose.env.yml:

version: '3.6'
services:
  web:
    # This makes sure the working dir is set for running tests via phpstorm
    working_dir: /var/www/html
@rfay rfay changed the title working_dir is not written to .ddev-docker-compose-full.yaml Use working_dir in generated docker-compose instead of dynamically setting working_dir on launch Aug 12, 2021
@rfay rfay added this to the v1.18 milestone Aug 13, 2021
@rfay
Copy link
Member

rfay commented Aug 13, 2021

I accidentally worked on this and would love to have you review it @mstrelan - You can use the gitpod links in #3160 or download the artifacts from https://github.com/drud/ddev/actions/runs/1126173412

@mstrelan
Copy link
Author

mstrelan commented Aug 20, 2021 via email

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

2 participants