mirror of https://github.com/abpframework/eventhub
21 changed files with 152 additions and 83 deletions
@ -1,22 +1,31 @@ |
|||
param ($version='latest') |
|||
|
|||
az acr login --name volocr |
|||
|
|||
docker tag eventhub.dbmigrator:latest volocr.azurecr.io/eventhub.dbmigrator:latest |
|||
docker push volocr.azurecr.io/eventhub.dbmigrator:latest |
|||
docker tag eventhub.dbmigrator:$version volocr.azurecr.io/eventhub.dbmigrator:$version |
|||
docker push volocr.azurecr.io/eventhub.dbmigrator:$version |
|||
docker tag volocr.azurecr.io/eventhub.dbmigrator:$version volocr.azurecr.io/eventhub.dbmigrator:latest |
|||
|
|||
docker tag eventhub.www:latest volocr.azurecr.io/eventhub.www:latest |
|||
docker push volocr.azurecr.io/eventhub.www:latest |
|||
docker tag eventhub.www:$version volocr.azurecr.io/eventhub.www:$version |
|||
docker push volocr.azurecr.io/eventhub.www:$version |
|||
docker tag volocr.azurecr.io/eventhub.www:$version volocr.azurecr.io/eventhub.www:latest |
|||
|
|||
docker tag eventhub.api:latest volocr.azurecr.io/eventhub.api:latest |
|||
docker push volocr.azurecr.io/eventhub.api:latest |
|||
docker tag eventhub.api:$version volocr.azurecr.io/eventhub.api:$version |
|||
docker push volocr.azurecr.io/eventhub.api:$version |
|||
docker tag volocr.azurecr.io/eventhub.api:$version volocr.azurecr.io/eventhub.api:latest |
|||
|
|||
docker tag eventhub.admin:latest volocr.azurecr.io/eventhub.admin:latest |
|||
docker push volocr.azurecr.io/eventhub.admin:latest |
|||
docker tag eventhub.admin:$version volocr.azurecr.io/eventhub.admin:$version |
|||
docker push volocr.azurecr.io/eventhub.admin:$version |
|||
docker tag volocr.azurecr.io/eventhub.admin:$version volocr.azurecr.io/eventhub.admin:latest |
|||
|
|||
docker tag eventhub.admin-api:latest volocr.azurecr.io/eventhub.admin-api:latest |
|||
docker push volocr.azurecr.io/eventhub.admin-api:latest |
|||
docker tag eventhub.admin-api:$version volocr.azurecr.io/eventhub.admin-api:$version |
|||
docker push volocr.azurecr.io/eventhub.admin-api:$version |
|||
docker tag volocr.azurecr.io/eventhub.admin-api:$version volocr.azurecr.io/eventhub.admin-api:latest |
|||
|
|||
docker tag eventhub.account:latest volocr.azurecr.io/eventhub.account:latest |
|||
docker push volocr.azurecr.io/eventhub.account:latest |
|||
docker tag eventhub.account:$version volocr.azurecr.io/eventhub.account:$version |
|||
docker push volocr.azurecr.io/eventhub.account:$version |
|||
docker tag volocr.azurecr.io/eventhub.account:$version volocr.azurecr.io/eventhub.account:latest |
|||
|
|||
docker tag eventhub.background-services:latest volocr.azurecr.io/eventhub.background-services:latest |
|||
docker push volocr.azurecr.io/eventhub.background-services:latest |
|||
docker tag eventhub.background-services:$version volocr.azurecr.io/eventhub.background-services:$version |
|||
docker push volocr.azurecr.io/eventhub.background-services:$version |
|||
docker tag volocr.azurecr.io/eventhub.background-services:$version volocr.azurecr.io/eventhub.background-services:latest |
|||
|
|||
@ -1 +1,4 @@ |
|||
helm upgrade --install eh-az eventhub -f .\eventhub\values.azure.yaml --namespace eventhub --create-namespace |
|||
param ($version='latest') |
|||
|
|||
kubectl delete job eh-az-dbmigrator |
|||
helm upgrade --install eh-az eventhub -f .\eventhub\values.azure.yaml --namespace eventhub --create-namespace --set global.eventHubImageVersion=$version |
|||
@ -0,0 +1,4 @@ |
|||
param ($version='latest') |
|||
|
|||
kubectl delete job eh-st-dbmigrator |
|||
helm upgrade --install eh-st eventhub --namespace eventhub --create-namespace --set global.eventHubImageVersion=$version |
|||
@ -1,18 +1,21 @@ |
|||
apiVersion: batch/v1 |
|||
kind: Job |
|||
apiVersion: apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: {{ .Release.Name }}-{{ .Chart.Name }} |
|||
spec: |
|||
activeDeadlineSeconds: 180 |
|||
selector: |
|||
matchLabels: |
|||
app: {{ .Release.Name }}-{{ .Chart.Name }} |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app: {{ .Release.Name }}-{{ .Chart.Name }} |
|||
spec: |
|||
containers: |
|||
- name: {{ .Release.Name }}-{{ .Chart.Name }} |
|||
image: {{ .Values.containerImage }} |
|||
- image: {{ .Values.containerImage }}:{{ .Values.global.eventHubImageVersion }} |
|||
imagePullPolicy: {{ .Values.global.imagePullPolicy }} |
|||
name: {{ .Release.Name }}-{{ .Chart.Name }} |
|||
env: |
|||
{{ include "eventhub.global.env" . | indent 8 }} |
|||
- name: "ConnectionStrings__Default" |
|||
value: {{ .Values.global.defaultConnString }} |
|||
restartPolicy: Never |
|||
backoffLimit: 10 |
|||
value: {{ .Values.global.defaultConnString }} |
|||
@ -1,49 +1,65 @@ |
|||
namespace EventHub.Web |
|||
using Microsoft.Extensions.Configuration; |
|||
|
|||
namespace EventHub.Web |
|||
{ |
|||
public class EventHubUrlOptions |
|||
{ |
|||
private const string ConfigurationName = "AppUrls"; |
|||
private const string AccountDefaultValue = "https://localhost:44313"; |
|||
private const string AdminDefaultValue = "https://localhost:44307"; |
|||
private const string WwwDefaultValue = "https://localhost:44308"; |
|||
private const string ApiDefaultValue = "https://localhost:44362"; |
|||
private const string ApiInternalDefaultValue = ApiDefaultValue; |
|||
private const string AdminApiDefaultValue = "https://localhost:44305"; |
|||
|
|||
public string Account { get; set; } = "https://localhost:44313"; |
|||
public string Www { get; set; } = "https://localhost:44308"; |
|||
public string Api { get; set; } = "https://localhost:44362"; |
|||
public string ApiInternal { get; set; } = "https://localhost:44362"; |
|||
public string Admin { get; set; } = "https://localhost:44307"; |
|||
public string AdminApi { get; set; } = "https://localhost:44305"; |
|||
public string Account { get; set; } = AccountDefaultValue; |
|||
public string Www { get; set; } = WwwDefaultValue; |
|||
public string Api { get; set; } = ApiDefaultValue; |
|||
public string ApiInternal { get; set; } = ApiInternalDefaultValue; |
|||
public string Admin { get; set; } = AdminDefaultValue; |
|||
public string AdminApi { get; set; } = AdminApiDefaultValue; |
|||
|
|||
public static string GetAccountConfigKey() |
|||
public static string GetAccountConfigValue(IConfiguration configuration) |
|||
{ |
|||
return GetConfigKey(nameof(Account)); |
|||
return GetConfigValue(configuration, nameof(Account), AccountDefaultValue); |
|||
} |
|||
|
|||
public static string GetWwwConfigKey() |
|||
public static string GetWwwConfigValue(IConfiguration configuration) |
|||
{ |
|||
return GetConfigKey(nameof(Www)); |
|||
return GetConfigValue(configuration, nameof(Www), WwwDefaultValue); |
|||
} |
|||
|
|||
public static string GetApiInternalConfigKey() |
|||
public static string GetApiInternalConfigValue(IConfiguration configuration) |
|||
{ |
|||
return GetConfigKey(nameof(ApiInternal)); |
|||
return GetConfigValue(configuration, nameof(ApiInternal), ApiInternalDefaultValue); |
|||
} |
|||
|
|||
public static string GetApiConfigKey() |
|||
|
|||
public static string GetApiConfigValue(IConfiguration configuration) |
|||
{ |
|||
return GetConfigKey(nameof(Api)); |
|||
return GetConfigValue(configuration, nameof(Api), ApiDefaultValue); |
|||
} |
|||
|
|||
public static string GetAdminConfigKey() |
|||
public static string GetAdminConfigValue(IConfiguration configuration) |
|||
{ |
|||
return GetConfigKey(nameof(Admin)); |
|||
return GetConfigValue(configuration, nameof(Admin), AdminDefaultValue); |
|||
} |
|||
|
|||
public static string GetAdminApiConfigKey() |
|||
|
|||
public static string GetAdminApiConfigValue(IConfiguration configuration) |
|||
{ |
|||
return GetConfigKey(nameof(AdminApi)); |
|||
return GetConfigValue(configuration, nameof(AdminApi), AdminApiDefaultValue); |
|||
} |
|||
|
|||
|
|||
private static string GetConfigKey(string appName) |
|||
{ |
|||
return $"{ConfigurationName}:{appName}"; |
|||
} |
|||
|
|||
private static string GetConfigValue( |
|||
IConfiguration configuration, |
|||
string appName, |
|||
string defaultValue) |
|||
{ |
|||
return configuration[GetConfigKey(appName)] ?? defaultValue; |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue