bernhard Posted August 13 Author Share Posted August 13 I've created a custom alias: Quote alias ddc="limactl start && ddev config --php-version=8.3 --database=mariadb:10.6 --webserver-type=apache-fpm --timezone=Europe/Vienna --omit-containers=dba --web-environment='TRACY_LOCALROOTPATH=\$DDEV_APPROOT/'" So all I have to do is type "ddc" and hit enter 3 Link to comment Share on other sites More sharing options...
Stefanowitsch Posted August 15 Share Posted August 15 On 8/13/2024 at 4:17 PM, bernhard said: I've created a custom alias: So all I have to do is type "ddc" and hit enter Have you found a solution for specifying multiple "upload_dirs" inside this initial config call? It seems not to work here. Link to comment Share on other sites More sharing options...
bernhard Posted August 15 Author Share Posted August 15 Here you go: alias ddc="limactl start && ddev config --php-version=8.3 --database=mariadb:10.6 --webserver-type=apache-fpm --timezone=Europe/Vienna --omit-containers=dba --web-environment='TRACY_LOCALROOTPATH=\$DDEV_APPROOT/' --upload-dirs='site/assets/files,foo/bar'" Note that you need to reload your shell after updating your alias file! 2 1 Link to comment Share on other sites More sharing options...
Greg Lumley Posted August 29 Share Posted August 29 I'm really enjoying DDEV and ProcessWire as I dive back into web development more seriously after many years. However, debugging has always been one of my weak areas, and I'm keen to get that sorted out. So far, I've struggled to find a great tutorial on setting up DDEV with VS Code specifically for ProcessWire. Most of what I've come across are lengthy Drupal tutorials with Drupal-specific settings, which end up overwhelming me. If there isn't a good resource out there, could you please share your setup procedure and the VS Code extensions, settings you've made in "settings.json" that you use with your DDEV ProcessWire environment? For example, I'd like to be able to open a file with a reported error from Tracy Debugger in VS Code, by clicking on it but of course: but my current setup isn't allowing me to do that. I'm also using RockFrontend—thank you @bernhard It's a pleasure to work with, especially when adapting static HTML templates. Thank you so much. 1 Link to comment Share on other sites More sharing options...
bernhard Posted August 29 Author Share Posted August 29 I've done a video about DDEV, but it doesn't go through setting up ddev. Just follow the instructions on the ddev website. 6 minutes ago, Greg Lumley said: For example, I'd like to be able to open a file with a reported error from Tracy Debugger in VS Code, by clicking on it but of course: For this you need to tell tracy debugger where the files live on your local file system. This is because PW + Tracy run inside the container and inside the container your files live in /var/www/html. So if you click on a debugging link in tracy then your OS tries to find the file /var/www/html/foo.php and obviously can't find it. // tracy config for ddev development $config->tracy = [ 'outputMode' => 'development', 'guestForceDevelopmentLocal' => true, 'forceIsLocal' => true, 'localRootPath' => '/path/to/your/project/', 'numLogEntries' => 100, // for RockMigrations 'editor' => 'cursor://file/%file:%line', ]; The important part for you is the "localRootPath" setting. 2 Link to comment Share on other sites More sharing options...
nurkka Posted October 25 Share Posted October 25 Hi all! I am developing locally with ProcessWire and DDEV, and since some days, ddev slows down very much. When I start it, it's very, very fast, but after some "database interaction" like saving some changes on pages or creating new fields, it gets terribly slow. I mean like 20 to 30 seconds load time in the backend when opening a page. When I do `ddev restart` it's fast again for a short period of time, but after some interaction, it again slows down. There are no errors on the page, I am really sure that this is only an issue with ddev and not with my website project. And it's a rather small project, i.e. no big database etc. Does anyone have any tips what I can do to resolve this problem? I currently don't have any clue what's going on and where or what I could test to find out something. Link to comment Share on other sites More sharing options...
bernhard Posted October 25 Author Share Posted October 25 Are you on Windows? I've had similar issues on my old windows laptop but don't know why that happened. I didn't look into it, as I had to switch to apple anyhow.. Did you make sure to turn off all other projects with ddev poweroff? Other than that I think it would be best to ask for help at DDEV, they are very active with helping out. Link to comment Share on other sites More sharing options...
nurkka Posted October 25 Share Posted October 25 Thanks @bernhard ! Yes, I turned off everything else with `ddev poweroff` and there are no other heavy tasks running on my computer. And yes, it's a Windows laptop, and some days ago there was a huge Windows update. Perhaps that did mess up something with WSL2, Docker, etc. Running my IDE PHPStorm in the Docker container didn't work well, when I first tried it, so I am currently stuck with that Windows to Docker mutagen sync stuff (which I don't fully understand yet :-)). I will try to find out when exactly the performance drops occur. If anyone had similar performance issues, I would be thankful for any hints. Link to comment Share on other sites More sharing options...
dotnetic Posted October 25 Share Posted October 25 @nurkkaMutagen is mostly for macOS users and does not have to be enabled on WSL2. WSL2 is already the preferred environment for Windows users, but if you’re still using traditional Windows this makes a huge difference. Turning on Mutagen doesn’t make sense on Linux or WSL2. Do you have TracyDebugger installed? Take a look if you got logging enabled. In some projects Tracy Logs and Informations take a long time to load (but 30 secs is really too long). Try to disable Tracy and if the load time is still slow. But you mentioned, that after a ddev restart it feels fast again, so Tracy (or the logs) are not the culprit. 1 Link to comment Share on other sites More sharing options...
nurkka Posted October 25 Share Posted October 25 Thanks @dotnetic ! When installing DDEV the first time, I tried to use it "directly" in WSL2, but that didn't work (in my case). I then switched to the windows version of DDEV with Docker Desktop, and that worked perfectly until some days ago. I was really happy with that setup and had not planned to switch that anytime soon 🤪 Until now, I also had no problems with mutagen, except for sometimes a longer startup time when doing `ddev start`. But when DDEV ran, it always was super fast ... until now. Yes, I have TracyDebugger, but logging is turned off. 🤷♂️ Link to comment Share on other sites More sharing options...
kongondo Posted October 25 Share Posted October 25 4 hours ago, nurkka said: When installing DDEV the first time, I tried to use it "directly" in WSL2, but that didn't work (in my case). Works fine for me. What 'didn't work'? Link to comment Share on other sites More sharing options...
kongondo Posted October 25 Share Posted October 25 And this is good time to say thanks to @bernhardand others here for making me look at DDEV! For some reason I used to confuse it with Devil Box. DDEV is great! I have it working for different sites some of which are in a multi-site setup with different databases but one ProcessWire. 1 Link to comment Share on other sites More sharing options...
nurkka Posted October 25 Share Posted October 25 3 hours ago, kongondo said: Works fine for me. What 'didn't work'? Sorry, I don't remember any details, that was too long ago ... Link to comment Share on other sites More sharing options...
kongondo Posted 7 hours ago Share Posted 7 hours ago On 10/25/2024 at 9:29 AM, nurkka said: I am developing locally with ProcessWire and DDEV, and since some days, ddev slows down very much. What version of DDEV are you using? I know there is a recent update, 1.23.5. I am wondering whether this could be responsible for the slowness? I am on version 1.23.4 and have not upgraded yet (and running in WSL2 as mentioned earlier). Link to comment Share on other sites More sharing options...
cwsoft Posted 5 hours ago Share Posted 5 hours ago Running latest ddev version on Windows 11 under wsl2. No slow down seen yet compared to previous versions. 1 Link to comment Share on other sites More sharing options...
Recommended Posts