dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.91k stars 476 forks source link

Enable devcontainers in repo. #6491

Closed mitchdenny closed 3 weeks ago

mitchdenny commented 4 weeks ago

Description

This is an initial PR to enable devcontainer support in the repo. The goal is to enable the various remote development scenarios (Codespaces, SSH, etc) so that we can test them. This is important because we've added logic to the apphost that can do things like detect it is running in Codespaces and using the Aspire repo under Codespaces is a good way of casually validating everything is working.

image

Outstanding issues

Fixes # (issue)

Checklist

mitchdenny commented 4 weeks ago

Couple of gotchas. For forwarded ports, it can take some time for Codespaces to generate the TLS cert for the endpoint. You just have to be patient. Part of explicitly forwarding the ports in the .devcontainer.json file is to make sure that its mapped as HTTPS or HTTP as appropriate.

davidfowl commented 3 weeks ago

/azp run

azure-pipelines[bot] commented 3 weeks ago
Azure Pipelines successfully started running 1 pipeline(s).
davidfowl commented 3 weeks ago

@mitchdenny one place where we don't detect the codespace and print the right url is here:

image

We should change this too.

mitchdenny commented 3 weeks ago

Yeah I was looking at this I made some tweaks last night as an experiment. I can put up a PR.

davidfowl commented 3 weeks ago

Also it seems like only certain playground examples work?