Base path fix and k8s config updated
This commit is contained in:
parent
0f1d904459
commit
7321d5e5fc
@ -15,8 +15,8 @@ spec:
|
||||
image: eshop/basket.api
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/basket-api
|
||||
- name: PATH_BASE
|
||||
value: /basket-api
|
||||
- name: ConnectionString
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -59,8 +59,8 @@ spec:
|
||||
image: eshop/catalog.api
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/catalog-api
|
||||
- name: PATH_BASE
|
||||
value: /catalog-api
|
||||
- name: ConnectionString
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -103,8 +103,8 @@ spec:
|
||||
image: eshop/identity.api
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/identity
|
||||
- name: PATH_BASE
|
||||
value: /identity
|
||||
- name: ConnectionStrings__DefaultConnection
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -169,8 +169,8 @@ spec:
|
||||
image: eshop/ordering.api
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/ordering-api
|
||||
- name: PATH_BASE
|
||||
value: /ordering-api
|
||||
- name: ConnectionString
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -213,8 +213,8 @@ spec:
|
||||
image: eshop/locations.api
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/locations-api
|
||||
- name: PATH_BASE
|
||||
value: /locations-api
|
||||
- name: ConnectionString
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -267,8 +267,8 @@ spec:
|
||||
image: eshop/marketing.api
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/marketing-api
|
||||
- name: PATH_BASE
|
||||
value: /marketing-api
|
||||
- name: ConnectionString
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -331,8 +331,8 @@ spec:
|
||||
image: eshop/payment.api
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/payment-api
|
||||
- name: PATH_BASE
|
||||
value: /payment-api
|
||||
- name: AzureServiceBusEnabled
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -365,8 +365,8 @@ spec:
|
||||
image: eshop/webmvc
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/webmvc
|
||||
- name: PATH_BASE
|
||||
value: /webmvc
|
||||
- name: DPConnectionString
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
@ -426,8 +426,8 @@ spec:
|
||||
image: eshop/webstatus
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: ASPNETCORE_URLS
|
||||
value: http://0.0.0.0:80/webstatus
|
||||
- name: PATH_BASE
|
||||
value: /webstatus
|
||||
- name: BasketUrl
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
|
@ -1,7 +1,7 @@
|
||||
Param(
|
||||
[parameter(Mandatory=$true)][string]$resourceGroupName,
|
||||
[parameter(Mandatory=$true)][string]$location,
|
||||
[parameter(Mandatory=$true)][string]$registryName,
|
||||
[parameter(Mandatory=$false)][string]$registryName,
|
||||
[parameter(Mandatory=$true)][string]$orchestratorName,
|
||||
[parameter(Mandatory=$true)][string]$dnsName,
|
||||
[parameter(Mandatory=$true)][string]$createAcr=$true
|
||||
@ -11,7 +11,7 @@
|
||||
Write-Host "Creating resource group..." -ForegroundColor Yellow
|
||||
az group create --name=$resourceGroupName --location=$location
|
||||
|
||||
if ($createAcr) {
|
||||
if ($createAcr -eq $true) {
|
||||
# Create Azure Container Registry
|
||||
Write-Host "Creating Azure Container Registry..." -ForegroundColor Yellow
|
||||
az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic
|
||||
@ -24,5 +24,7 @@ az acs create --orchestrator-type=kubernetes --resource-group $resourceGroupName
|
||||
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config
|
||||
az acs kubernetes get-credentials --resource-group=$resourceGroupName --name=$orchestratorName
|
||||
|
||||
# Show ACR credentials
|
||||
az acr credential show -n $registryName
|
||||
if ($createAcr -eq $true) {
|
||||
# Show ACR credentials
|
||||
az acr credential show -n $registryName
|
||||
}
|
@ -169,6 +169,12 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
{
|
||||
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
app.UseStaticFiles();
|
||||
app.UseCors("CorsPolicy");
|
||||
|
||||
|
@ -167,6 +167,13 @@
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerFactory.AddDebug();
|
||||
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.UseCors("CorsPolicy");
|
||||
|
||||
app.UseMvcWithDefaultRoute();
|
||||
|
@ -125,6 +125,13 @@ namespace eShopOnContainers.Identity
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
}
|
||||
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
|
||||
|
@ -141,6 +141,12 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||
{
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.UseCors("CorsPolicy");
|
||||
|
||||
ConfigureAuth(app);
|
||||
|
@ -173,6 +173,12 @@
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env,ILoggerFactory loggerFactory)
|
||||
{
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.UseCors("CorsPolicy");
|
||||
|
||||
ConfigureAuth(app);
|
||||
|
@ -189,6 +189,13 @@
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerFactory.AddDebug();
|
||||
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.UseCors("CorsPolicy");
|
||||
|
||||
ConfigureAuth(app);
|
||||
|
@ -92,6 +92,12 @@ namespace Payment.API
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
||||
{
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.UseMvcWithDefaultRoute();
|
||||
|
||||
app.UseSwagger()
|
||||
|
@ -123,6 +123,13 @@ namespace Microsoft.eShopOnContainers.WebMVC
|
||||
app.UseExceptionHandler("/Error");
|
||||
}
|
||||
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.UseSession();
|
||||
app.UseStaticFiles();
|
||||
|
||||
|
@ -95,6 +95,13 @@ namespace eShopConContainers.WebSPA
|
||||
//Seed Data
|
||||
WebContextSeed.Seed(app, env, loggerFactory);
|
||||
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.Use(async (context, next) =>
|
||||
{
|
||||
await next();
|
||||
|
@ -60,6 +60,12 @@ namespace WebStatus
|
||||
app.UseExceptionHandler("/Home/Error");
|
||||
}
|
||||
|
||||
var pathBase = Configuration["PATH_BASE"];
|
||||
if (!string.IsNullOrEmpty(pathBase))
|
||||
{
|
||||
app.UsePathBase(pathBase);
|
||||
}
|
||||
|
||||
app.UseStaticFiles();
|
||||
|
||||
app.UseMvc(routes =>
|
||||
|
Loading…
x
Reference in New Issue
Block a user