diff --git a/.github/workflows/deploy-helm.yml b/.github/workflows/deploy-helm.yml
index 59796a18dd55d38db2cd5c8a5b768568d07c2b69..0e98465dfd1f9b783d79f1c8e17ba35ad2744af3 100644
--- a/.github/workflows/deploy-helm.yml
+++ b/.github/workflows/deploy-helm.yml
@@ -30,12 +30,19 @@ jobs:
kubecfg_path=${{ runner.temp }}/.kube_config
echo "${{ secrets.KUBECONFIG }}" > $kubecfg_path
- helm --kubeconfig=$kubecfg_path \
+ helm ls | awk '{print $1}' | grep -q ${{ inputs.DEPLOYMENT_NAME }} \
+ && helm --kubeconfig=$kubecfg_path \
upgrade \
--history-max 3 \
--reuse-values \
--set image.tag=${{ inputs.IMAGE_TAG }} \
--set podLabels.image-digest=${{ inputs.IMAGE_DIGEST }} \
+ ${{ inputs.DEPLOYMENT_NAME }} .helm/siibra-explorer/ \
+ || helm --kubeconfig=$kubecfg_path \
+ install\
+ --set image.tag=${{ inputs.IMAGE_TAG }} \
+ --set podLabels.image-digest=${{ inputs.IMAGE_DIGEST }} \
+ --set envObj.HOST_PATHNAME=/viewer \
${{ inputs.DEPLOYMENT_NAME }} .helm/siibra-explorer/
rm $kubecfg_path
@@ -50,14 +57,21 @@ jobs:
kubecfg_path=${{ runner.temp }}/.kube_config
echo "${{ secrets.KUBECONFIG }}" > $kubecfg_path
- helm --kubeconfig=$kubecfg_path \
+ helm ls | awk '{print $1}' | grep -q ${{ inputs.DEPLOYMENT_NAME }} \
+ && helm --kubeconfig=$kubecfg_path \
upgrade \
--history-max 3 \
--reuse-values \
--set image.tag=${{ inputs.IMAGE_TAG }} \
--set podLabels.image-digest=${{ inputs.IMAGE_DIGEST }} \
+ ${{ inputs.DEPLOYMENT_NAME }} .helm/siibra-explorer/ \
+ || helm --kubeconfig=$kubecfg_path \
+ install\
+ --set image.tag=${{ inputs.IMAGE_TAG }} \
+ --set podLabels.image-digest=${{ inputs.IMAGE_DIGEST }} \
+ --set envObj.HOST_PATHNAME=/viewer-staging \
${{ inputs.DEPLOYMENT_NAME }} .helm/siibra-explorer/
-
+
rm $kubecfg_path
trigger-deploy-expmt:
@@ -70,12 +84,19 @@ jobs:
kubecfg_path=${{ runner.temp }}/.kube_config
echo "${{ secrets.KUBECONFIG }}" > $kubecfg_path
- helm --kubeconfig=$kubecfg_path \
+ helm ls | awk '{print $1}' | grep -q ${{ inputs.DEPLOYMENT_NAME }} \
+ && helm --kubeconfig=$kubecfg_path \
upgrade \
--history-max 3 \
--reuse-values \
--set image.tag=${{ inputs.IMAGE_TAG }} \
--set podLabels.image-digest=${{ inputs.IMAGE_DIGEST }} \
+ ${{ inputs.DEPLOYMENT_NAME }} .helm/siibra-explorer/ \
+ || helm --kubeconfig=$kubecfg_path \
+ install\
+ --set image.tag=${{ inputs.IMAGE_TAG }} \
+ --set podLabels.image-digest=${{ inputs.IMAGE_DIGEST }} \
+ --set envObj.HOST_PATHNAME=/viewer-expmt \
${{ inputs.DEPLOYMENT_NAME }} .helm/siibra-explorer/
rm $kubecfg_path
diff --git a/.helm/siibra-explorer/values.yaml b/.helm/siibra-explorer/values.yaml
index 602d70a8bba2f4a53b6a0f700e233972360bfb6d..81f4da0354ac1e15735f258ed40f016efa7f5920 100644
--- a/.helm/siibra-explorer/values.yaml
+++ b/.helm/siibra-explorer/values.yaml
@@ -2,7 +2,7 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-replicaCount: 1
+replicaCount: 2
image:
repository: docker-registry.ebrains.eu/siibra/siibra-explorer
@@ -96,7 +96,6 @@ tolerations: []
affinity: {}
envObj:
- HOSTNAME: https://siibra-explorer.apps.tc.humanbrainproject.eu
OVERWRITE_SPATIAL_ENDPOINT: https://siibra-spatial-backend.apps.tc.humanbrainproject.eu
HOST_PATHNAME: /viewer
OVERWRITE_API_ENDPOINT: https://siibra-api-prod.apps.tc.humanbrainproject.eu/v3_0
diff --git a/Dockerfile b/Dockerfile
index e5669e328840b8e6fc767ad8a3333ff993a8890f..44ff0484477d84ab601a35958fd77fa02b1d5d8c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,5 @@
FROM node:16 as builder
-ARG BUILD_HASH
-ENV BUILD_HASH=${BUILD_HASH:-devbuild}
-
ARG BACKEND_URL
ENV BACKEND_URL=${BACKEND_URL}
@@ -47,6 +44,9 @@ RUN node third_party/matomo/processMatomo.js
# prod container
FROM python:3.10-alpine
+ARG BUILD_HASH
+ENV BUILD_HASH=${BUILD_HASH:-devbuild}
+
RUN adduser --disabled-password nonroot
RUN mkdir /common
diff --git a/backend/app/version_header.py b/backend/app/version_header.py
index 8ece7c233df70edb79b486311e853ecfd08e7170..4881e4bd5ebe448972483ef83098098870862929 100644
--- a/backend/app/version_header.py
+++ b/backend/app/version_header.py
@@ -12,5 +12,8 @@ class VersionHeaderMW(BaseHTTPMiddleware):
or (300 <= resp.status_code < 400) # if the request is redirect, do not interfere
):
return resp
+
+ # allow for debugging, cache should be busted every 10 min
resp.headers["ETag"] = BUILD_HASH
+ resp.headers["Cache-Control"] = "max-age=600"
return resp
diff --git a/docs/releases/v2.14.9.md b/docs/releases/v2.14.9.md
new file mode 100644
index 0000000000000000000000000000000000000000..016bd441c4f6e3578dd9a68d92768d136b167e0e
--- /dev/null
+++ b/docs/releases/v2.14.9.md
@@ -0,0 +1,5 @@
+# v2.14.9
+
+## Bugfix
+
+- Fix deployment issues
diff --git a/package.json b/package.json
index 356214b9bfd02ea2a0733f12d2f30e1465d3b69e..0d8728b4facb97c0a093a25cbaed83ad44525130 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "siibra-explorer",
- "version": "2.14.8",
+ "version": "2.14.9",
"description": "siibra-explorer - explore brain atlases. Based on humanbrainproject/nehuba & google/neuroglancer. Built with angular",
"scripts": {
"lint": "eslint src --ext .ts",