Skip to content

Commit

Permalink
expose only http port in compose (#1721)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwateratmsft authored Mar 5, 2020
1 parent acd370a commit a075abc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/configureWorkspace/configureDotNetCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,9 @@ function validateForUnresolvedToken(contents: string): void {

function generateComposeFiles(dockerfileName: string, platform: Platform, os: PlatformOS | undefined, ports: number[], artifactName: string): ScaffoldFile[] {
const serviceName = path.basename(artifactName, path.extname(artifactName));
let jsonPorts: string = `${getComposePorts(ports)}`;
if (jsonPorts?.length > 0) {
jsonPorts = `\n${jsonPorts}`;
}
// Compose doesn't configure the https, so expose only the http port.
// Otherwise the 'Open in Browser' command will try to open https endpoint and will not work.
let jsonPorts: string = ports?.length > 0 ? `\n${getComposePorts([ports[0]])}` : '';

let environmentVariables: string = '';
if (platform === '.NET: ASP.NET Core') {
Expand Down

0 comments on commit a075abc

Please sign in to comment.