issues/27: test contour adminpanel cabinet Redmine fixes

This commit is contained in:
Valery Petrov
2026-05-29 20:06:46 +03:00
parent 0edd6d44a8
commit ea2e9d6054
11 changed files with 134 additions and 1 deletions
+13 -1
View File
@@ -6,7 +6,8 @@ metadata:
data:
env.js: |
window.__ENV__ = {
API_BASE_URL: {{ .Values.runtimeEnv.API_BASE_URL | quote }}
API_BASE_URL: {{ .Values.runtimeEnv.API_BASE_URL | quote }}{{- if .Values.runtimeEnv.SENTRY_DSN }},
SENTRY_DSN: {{ .Values.runtimeEnv.SENTRY_DSN | quote }}{{- end }}
};
---
apiVersion: apps/v1
@@ -40,6 +41,17 @@ spec:
- name: env-js
mountPath: /config/env.js
subPath: env.js
lifecycle:
postStart:
exec:
command:
- sh
- -c
- |
API_URL=$(grep -o 'API_BASE_URL: "[^"]*"' /config/env.js | sed 's/.*"\([^"]*\)".*/\1/')
if [ -n "$API_URL" ]; then
find /usr/share/nginx/html/assets -name '*.js' -exec sed -i "s|https://api.sovamed.ru|${API_URL}|g" {} +
fi
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes: