Set Startup URL for Visual Studio Docker-Compose project

Viewed 1438

I am using the container tools for Visual Studio 2019. With them I have a docker compose project in my solution. When that project is run, it starts up two separate containers. (This works correctly.)

It also starts up a browser and goes to a URL. The URL it is going to is wrong, and I want to change it. But I can't find anything that controls the URL.

The Docker-Compose project file has some settings in it like DockerServiceUrl and DockerLaunchAction, but changing these has no effect on the url that is launched.

How can I change the startup url for a Docker Compose Orchestration Project in Visual Studio 2019?

2 Answers

Tutorial: Create a multi-container app with Docker Compose

The first project that you use when you add container orchestration is set up to be launched when you run or debug. You can configure the launch action in the Project Properties for the docker-compose project. On the docker-compose project node, right-click to open the context menu, and then choose Properties, or use Alt+Enter. The following screenshot shows the properties you would want for the solution used here. For example, you can change the page that is loaded by customizing the Service URL property.

enter image description here

  • Right-click the docker-compose project and go to properties.

  • There you can configure the Service URL that gets launched on run.

Related