diff --git a/contrib/helm/cds/templates/ui-deployment.yaml b/contrib/helm/cds/templates/ui-deployment.yaml index 1d06383f58..bbcc71dd53 100644 --- a/contrib/helm/cds/templates/ui-deployment.yaml +++ b/contrib/helm/cds/templates/ui-deployment.yaml @@ -35,6 +35,8 @@ spec: env: - name: BACKEND_HOST value: {{ template "cds.fullname" . }}-api + - name: BACKEND_HOOKS + value: {{ template "cds.fullname" . }}-hooks - name: BASE_URL value: "{{ .Values.ui.baseUrl }}" - name: CDS_LOG_LEVEL diff --git a/docker-compose.yml b/docker-compose.yml index 9a37a1b8e8..acffb25ef3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,6 +58,7 @@ services: image: ovhcom/cds-ui:latest environment: BACKEND_HOST: cds-api:8081 + BACKEND_HOOKS: cds-hooks:8083 BASE_URL: / ports: - "2015:2015" diff --git a/docs/content/hosting/ready-to-run/from-binaries.md b/docs/content/hosting/ready-to-run/from-binaries.md index b9e335c250..1fac177181 100644 --- a/docs/content/hosting/ready-to-run/from-binaries.md +++ b/docs/content/hosting/ready-to-run/from-binaries.md @@ -82,6 +82,9 @@ cd dist/ # BACKEND_HOST contains a URL to CDS Engine export BACKEND_HOST="http://localhost:8081" +# BACKEND_HOOKS contains a URL to CDS Hooks +export BACKEND_HOOKS="http://localhost:8083" + # if you expose CDS on a domain as https://your-domain/your-cds, enter "/your-cds" BASE_URL="/" sed -i "s#base href=\"/\"#base href=\"${BASE_URL}\"#g" index.html diff --git a/ui/Caddyfile b/ui/Caddyfile index f5a9ae9ab2..bf106af85f 100644 --- a/ui/Caddyfile +++ b/ui/Caddyfile @@ -15,6 +15,10 @@ header_upstream Session-Token {>Session-Token} } + proxy /cdshooks {$BACKEND_HOOKS} { + without /cdshooks + } + proxy /assets/worker/cdsapi {$BACKEND_HOST} { without /assets/worker/cdsapi header_upstream Authorization {>Authorization}