localgovdrupal / localgov_project

Project template for Drupal 10 sites built with the LocalGov Drupal distribution.
https://localgovdrupal.org
GNU General Public License v2.0
11 stars 9 forks source link

Gitpod and ddev support #102

Closed keelanfh closed 1 year ago

keelanfh commented 1 year ago

Closes #100

@finnlewis might be good to look at this if you are looking at #92? This is the ddev config file that I have set up for Gitpod and have been using for a while. We don't have to use exactly this config for ddev, but happy to test anything you're working on to see that it works in Gitpod too.

keelanfh commented 1 year ago

Couple of things to think about:

finnlewis commented 1 year ago

DDEV works locally and feels really nice! Kind of a drop in replacement for Lando. Demo site installs well and it all feels pretty snappy. (I'd like to benchmark DDEV against Lando actually),

I thought I'd change the default hostname from localgov-project to localgov to be consistent with Lando config, is the OK @keelanfh ?

I'll take a look at it running in Gitpod too.

finnlewis commented 1 year ago

I would LOVE to get xdebug working in Gitpod... so the xdebug vscode extension is good to have.

keelanfh commented 1 year ago

Yep @finnlewis that's fine. Thanks for updating the drupalpod image too, that was on my list! :D

finnlewis commented 1 year ago

I'm getting this error now... is it to do with the change of image, or just limitations on gitpod space?

image

keelanfh commented 1 year ago

I'm getting the same error. The error isn't occurring when I go back to https://github.com/localgovdrupal/localgov_project/pull/102/commits/a6482c029f3221e6dabfa0f634b325052601404e, so it does look like it's to do with the new image.

keelanfh commented 1 year ago

If you have Docker running locally, want to try just running docker pull drupalpod/drupalpod-gitpod-base/20221216 to see if that works?

keelanfh commented 1 year ago

Seems to be working fine for me with the latest image, after my last change!

finnlewis commented 1 year ago

Doh! Thanks @keelanfh !

finnlewis commented 1 year ago

I have debugging working in Gitpod now, which is nice :)

Any idea how we add a default launch.json config to the Gitpod setup?

It needs to contain this:


{
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "pathMappings": {
                "/var/www/html": "${workspaceRoot}"
              }
        }
    ]
}
keelanfh commented 1 year ago

Try that? There was something similar in the original repo - https://github.com/shaal/ddev-gitpod/blob/main/.theia/launch.json - but I removed it as I was slimming it down. But if it's useful, let's add it back in!

finnlewis commented 1 year ago

Yay! xdebug working out of the box! I am sooooo happy!

image

finnlewis commented 1 year ago

It would be great to get some other people to test this.

I do think we should bring it into the project and aim to support it, it is great for testing and demonstrations and could be a game changer for some councils and developers.

Including default configuration in .vscode for ddev might be mildly annoying for someone using vscode and lando, but I tend to have my workspace in a folder above the project folder so it doesn't conflict for me. It is easy enough to document the differences and change the benefits probably outweigh the annoyance.

@andybroomfield @Adnan-cds @ekes @stephen-cox penny for your thoughts?

To test this go to: https://gitpod.io/#https://github.com/localgovdrupal/localgov_project/tree/feature/100-gitpod and spin it up!

finnlewis commented 1 year ago

Note: