Browse Source

Merge pull request #31 from abpframework/gterdem/webApp_deployment_updates

Web App deployment fix
pull/32/head
Galip Tolga Erdem 5 years ago
committed by GitHub
parent
commit
f1b4c9bfbe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/angular/dynamic-env.json
  2. 28
      etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml
  3. 14
      etc/k8s/eshoponabp/charts/web/templates/web-deployment.yaml
  4. 3
      etc/k8s/eshoponabp/charts/web/values.yaml

2
apps/angular/dynamic-env.json

@ -8,7 +8,7 @@
"oAuthConfig": {
"issuer": "https://eshop-st-authserver",
"redirectUri": "https://eshop-st-web",
"clientId": "EShopOnAbp_App",
"clientId": "Web",
"responseType": "code",
"scope": "offline_access openid profile email phone IdentityService AdministrationService"
},

28
etc/k8s/eshoponabp/charts/web/templates/web-configmap.yaml

@ -0,0 +1,28 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap
data:
dynamic-env.json: |-
{
"production": "true",
"application": {
"baseUrl": "{{ .Values.config.selfUrl }}",
"name": "EShopOnAbp",
"logoUrl": ""
},
"oAuthConfig": {
"issuer": "{{ .Values.config.authServer.authority }}",
"redirectUri": "{{ .Values.config.selfUrl }}",
"requireHttps": "{{ .Values.config.authServer.requireHttpsMetadata }}",
"clientId": "Web",
"responseType": "code",
"scope": "offline_access openid profile email phone IdentityService AdministrationService"
},
"apis": {
"default": {
"url": "{{ .Values.config.gatewayUrl }}",
"rootNamespace": "EShopOnAbp"
}
}
}

14
etc/k8s/eshoponabp/charts/web/templates/web-deployment.yaml

@ -20,11 +20,15 @@ spec:
containerPort: 80
- name: https
containerPort: 443
volumeMounts:
- name: config-volume
mountPath: /app/dynamic-env.json
subPath: dynamic-env.json
env:
- name: BASE_URL
value: {{ .Values.config.selfUrl}}
- name: API_URL
value: {{ .Values.config.gatewayUrl}}
{{- if .Values.env }}
{{ toYaml .Values.env | indent 8 }}
{{- end }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-{{ .Chart.Name }}-configmap

3
etc/k8s/eshoponabp/charts/web/values.yaml

@ -1,6 +1,9 @@
config:
selfUrl: https://eshop-st-web
gatewayUrl: "https://eshop-st-gateway-web/"
authServer:
authority: http://eshop-st-authserver
requireHttpsMetadata: "false"
ingress:
host: eshop-st-web

Loading…
Cancel
Save