From 438f4fd4fe49c32f5f4920bac21b067e28f2d92e Mon Sep 17 00:00:00 2001 From: Marijn Kampf Date: Thu, 14 Mar 2024 08:57:56 +0000 Subject: [PATCH] Upgrade postgres, open search and redis (#6605) * Upgrade postgres, open search and redis * Rename /healthcheck end point to /pingdom --- Makefile | 2 +- docker-compose.base.yml | 2 +- docker-compose.e2e.backend.yml | 6 +++--- docker-compose.services.yml | 8 +++----- manifest.yml | 2 +- src/apps/healthcheck/index.js | 2 +- src/apps/healthcheck/serviceDependencies.js | 2 +- src/middleware/auth.js | 3 +-- src/middleware/features.js | 2 +- 9 files changed, 13 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 14eccc0563c..5937fa37125 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ docker-e2e = docker-compose -p dh -f docker-compose.base.yml -f docker-compose.e docker-dev = COMPOSE_HTTP_TIMEOUT=300 docker-compose -p dh -f docker-compose.base.yml -f docker-compose.frontend.dev.yml docker-storybook = docker-compose -p dh -f docker-compose.storybook.yml -wait-for-frontend = dockerize -wait tcp://localhost:3000/healthcheck -timeout 5m -wait-retry-interval 5s +wait-for-frontend = dockerize -wait tcp://localhost:3000/pingdom -timeout 5m -wait-retry-interval 5s wait-for-storybook = dockerize -wait tcp://localhost:65200 -timeout 5m -wait-retry-interval 5s wait-for-redis = dockerize -wait tcp://redis:6379 -timeout 5m diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 9e04e364500..8b8bb77d97b 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -26,4 +26,4 @@ services: command: npm run develop redis: - image: redis:6.2.6 + image: redis:7.2.4 diff --git a/docker-compose.e2e.backend.yml b/docker-compose.e2e.backend.yml index 8dc44453c6e..5186f2fc3f2 100644 --- a/docker-compose.e2e.backend.yml +++ b/docker-compose.e2e.backend.yml @@ -45,7 +45,7 @@ services: command: python short-running-worker.py long-running-worker.py postgres: - image: postgres:12 + image: postgres:16 ports: - "5432:5432" environment: @@ -54,7 +54,7 @@ services: POSTGRES_PASSWORD: password opensearch: - image: opensearchproject/opensearch:1.2.4 + image: opensearchproject/opensearch:2.11.0 ports: - '9200:9200' - '9300:9300' @@ -69,7 +69,7 @@ services: activity-feed-reverseproxy: build: ./test/end-to-end/proxy ports: - - 8081:8081 + - 8081:8081 depends_on: - activity-feed diff --git a/docker-compose.services.yml b/docker-compose.services.yml index 35359004a55..c9492e7d01f 100644 --- a/docker-compose.services.yml +++ b/docker-compose.services.yml @@ -35,13 +35,11 @@ services: - 8001:8001 depends_on: - lbdb - command: > - bash -c "sleep 5 && python manage.py migrate && - python manage.py collectstatic --noinput && - python -Wd manage.py runserver 0.0.0.0:8001" + command: > + bash -c "sleep 5 && python manage.py migrate && python manage.py collectstatic --noinput && python -Wd manage.py runserver 0.0.0.0:8001" lbdb: - image: postgres:9.6.9-alpine + image: postgres:16 restart: unless-stopped environment: POSTGRES_USER: postgres diff --git a/manifest.yml b/manifest.yml index 8c2817fde07..1f0ca508af0 100644 --- a/manifest.yml +++ b/manifest.yml @@ -3,7 +3,7 @@ applications: - buildpacks: - https://github.com/cloudfoundry/nodejs-buildpack.git#v1.8.23 health-check-type: http - health-check-http-endpoint: /healthcheck + health-check-http-endpoint: /pingdom memory: 5G disk_quota: 8G stack: cflinuxfs4 diff --git a/src/apps/healthcheck/index.js b/src/apps/healthcheck/index.js index a60cfed815b..a7e05235834 100644 --- a/src/apps/healthcheck/index.js +++ b/src/apps/healthcheck/index.js @@ -1,6 +1,6 @@ const router = require('./router') module.exports = { - mountpath: '/healthcheck', + mountpath: '/pingdom', router: router, } diff --git a/src/apps/healthcheck/serviceDependencies.js b/src/apps/healthcheck/serviceDependencies.js index 3975d6a532a..9f2e929c37c 100644 --- a/src/apps/healthcheck/serviceDependencies.js +++ b/src/apps/healthcheck/serviceDependencies.js @@ -6,7 +6,7 @@ const redisClient = require('../../lib/redis-client') module.exports = [ { name: 'api', - healthCheck: () => axios.get(`${config.apiRoot}/ping.xml`), + healthCheck: () => axios.get(`${config.apiRoot}/pingdom/ping.xml`), }, { name: 'redis', diff --git a/src/middleware/auth.js b/src/middleware/auth.js index 71892518c9d..bbe7a1d0ae5 100644 --- a/src/middleware/auth.js +++ b/src/middleware/auth.js @@ -9,8 +9,7 @@ const PUBLICLY_ACCESSIBLE_API_ENDPOINTS = [ const REGEX = new RegExp(PUBLICLY_ACCESSIBLE_API_ENDPOINTS.join('|')) module.exports = function auth(req, res, next) { - const passThrough = - req.session.token || /^\/(healthcheck|oauth)\b/.test(req.url) + const passThrough = req.session.token || /^\/(pingdom|oauth)\b/.test(req.url) if (passThrough) { return next() diff --git a/src/middleware/features.js b/src/middleware/features.js index 3941222fb6c..0f89dcc9069 100644 --- a/src/middleware/features.js +++ b/src/middleware/features.js @@ -19,7 +19,7 @@ function parseFeatureData(featureData = []) { module.exports = async function features(req, res, next) { try { const passThrough = - !req.session.token || /^\/(support|healthcheck|oauth)\b/.test(req.url) + !req.session.token || /^\/(support|pingdom|oauth)\b/.test(req.url) if (passThrough) { res.locals.features = {}