From 1c0ea169ce221cb0bb7e73790b030032a8897260 Mon Sep 17 00:00:00 2001 From: Oussama Miladi <35038682+omiladi@users.noreply.github.com> Date: Wed, 20 May 2026 10:41:07 +0200 Subject: [PATCH 1/5] fix: use bitnami image for strangler --- .github/workflows/job-lint.yml | 34 ++++++++++++++++------- apps/nginx-strangler/Dockerfile | 35 ++++-------------------- apps/nginx-strangler/conf.d/routing.conf | 4 +++ apps/nginx-strangler/entrypoint.sh | 11 ++++++++ apps/nginx-strangler/nginx.conf | 28 ------------------- 5 files changed, 45 insertions(+), 67 deletions(-) create mode 100644 apps/nginx-strangler/entrypoint.sh delete mode 100644 apps/nginx-strangler/nginx.conf diff --git a/.github/workflows/job-lint.yml b/.github/workflows/job-lint.yml index bbbae077d6..f7d4d5cf22 100644 --- a/.github/workflows/job-lint.yml +++ b/.github/workflows/job-lint.yml @@ -61,18 +61,32 @@ jobs: sudo apt-get update -qq sudo apt-get install -y --no-install-recommends nginx gettext-base # Préparer un répertoire de test isolé avec la config substituée - mkdir -p /tmp/nginx-test/conf.d /tmp/nginx-test/logs + mkdir -p /tmp/nginx-test/server_blocks /tmp/nginx-test/logs envsubst '${LEGACY_UPSTREAM} ${NESTJS_UPSTREAM}' \ < apps/nginx-strangler/conf.d/routing.conf \ - > /tmp/nginx-test/conf.d/routing.conf - # Adapter nginx.conf pour l'environnement CI (user www-data, paths accessibles) - sed \ - -e 's|^user .*|user www-data;|' \ - -e 's|pid .*|pid /tmp/nginx-test/nginx.pid;|' \ - -e 's|error_log .*|error_log /tmp/nginx-test/logs/error.log notice;|' \ - -e 's|access_log .*|access_log /tmp/nginx-test/logs/access.log main;|' \ - -e 's|include /etc/nginx/conf\.d/\*\.conf|include /tmp/nginx-test/conf.d/*.conf|' \ - apps/nginx-strangler/nginx.conf > /tmp/nginx-test/nginx.conf + > /tmp/nginx-test/server_blocks/routing.conf + # Créer un nginx.conf minimal pour la validation + cat > /tmp/nginx-test/nginx.conf <<'EOF' + user www-data; + worker_processes auto; + pid /tmp/nginx-test/nginx.pid; + error_log /tmp/nginx-test/logs/error.log notice; + events { + worker_connections 1024; + } + http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for" ' + 'upstream=$upstream_addr rt=$request_time'; + access_log /tmp/nginx-test/logs/access.log main; + sendfile on; + keepalive_timeout 65; + include /tmp/nginx-test/server_blocks/*.conf; + } + EOF nginx -t -c /tmp/nginx-test/nginx.conf env: LEGACY_UPSTREAM: "127.0.0.1:8080" diff --git a/apps/nginx-strangler/Dockerfile b/apps/nginx-strangler/Dockerfile index 30e3447dad..66a1c1fd51 100644 --- a/apps/nginx-strangler/Dockerfile +++ b/apps/nginx-strangler/Dockerfile @@ -1,36 +1,13 @@ -FROM nginx:1.27-alpine AS prod +FROM docker.io/bitnamilegacy/nginx:1.29.1 AS prod -# envsubst est inclus dans nginx:alpine via le paquet gettext -# On supprime la config par défaut -RUN rm /etc/nginx/conf.d/default.conf - -# Config principale -COPY apps/nginx-strangler/nginx.conf /etc/nginx/nginx.conf +USER 0 # Template de routing (sera substitué au démarrage) -COPY apps/nginx-strangler/conf.d/routing.conf /etc/nginx/templates/routing.conf.template - -# Donner à l'utilisateur nginx les droits d'écriture sur conf.d/ (pour envsubst au démarrage) -# et sur les répertoires de logs/pid nécessaires en mode non-root -RUN chown -R nginx:nginx \ - /etc/nginx/nginx.conf \ - /etc/nginx/conf.d \ - /etc/nginx/templates \ - /etc/nginx/mime.types \ - /var/cache/nginx \ - /var/log/nginx \ - && touch /var/run/nginx.pid \ - && chown nginx:nginx /var/run/nginx.pid - -USER nginx +COPY --chown=1001:0 --chmod=660 apps/nginx-strangler/conf.d/routing.conf /opt/bitnami/nginx/conf/server_blocks/routing.conf.template -HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ - CMD wget -qO- http://127.0.0.1:8080/health || exit 1 +# Script d'entrypoint pour substitution des variables +COPY --chown=1001:0 --chmod=770 apps/nginx-strangler/entrypoint.sh /docker-entrypoint-initdb.d/load-routing.sh -# Entrypoint : envsubst substitue les variables d'env dans les templates, -# puis démarre nginx en foreground -# Les variables substituées : LEGACY_UPSTREAM, NESTJS_UPSTREAM -CMD ["/bin/sh", "-c", \ - "envsubst '${LEGACY_UPSTREAM} ${NESTJS_UPSTREAM}' < /etc/nginx/templates/routing.conf.template > /etc/nginx/conf.d/routing.conf && nginx -t && nginx -g 'daemon off;'"] +USER 1001 EXPOSE 8080 diff --git a/apps/nginx-strangler/conf.d/routing.conf b/apps/nginx-strangler/conf.d/routing.conf index a5ffb7e09f..b22fa3216f 100644 --- a/apps/nginx-strangler/conf.d/routing.conf +++ b/apps/nginx-strangler/conf.d/routing.conf @@ -31,6 +31,10 @@ upstream server-nestjs { server { listen 8080; + # Taille des headers (nécessaire pour les tokens Keycloak) + large_client_header_buffers 4 32k; + + # ── Routes migrées vers NestJS ──────────────────────────────────────────── # (vide au démarrage — toutes les routes sont en fallback sur server-legacy) # diff --git a/apps/nginx-strangler/entrypoint.sh b/apps/nginx-strangler/entrypoint.sh new file mode 100644 index 0000000000..19a234e2e6 --- /dev/null +++ b/apps/nginx-strangler/entrypoint.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Substitue les variables d'environnement dans le template de routing +# Les variables substituées : LEGACY_UPSTREAM, NESTJS_UPSTREAM +envsubst '${LEGACY_UPSTREAM} ${NESTJS_UPSTREAM}' \ + < /opt/bitnami/nginx/conf/server_blocks/routing.conf.template \ + > /opt/bitnami/nginx/conf/server_blocks/routing.conf + +echo "Routing configuration generated with:" +echo " LEGACY_UPSTREAM=${LEGACY_UPSTREAM}" +echo " NESTJS_UPSTREAM=${NESTJS_UPSTREAM}" diff --git a/apps/nginx-strangler/nginx.conf b/apps/nginx-strangler/nginx.conf deleted file mode 100644 index 657e2100dd..0000000000 --- a/apps/nginx-strangler/nginx.conf +++ /dev/null @@ -1,28 +0,0 @@ -worker_processes auto; - -error_log /var/log/nginx/error.log notice; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" ' - 'upstream=$upstream_addr rt=$request_time'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - keepalive_timeout 65; - - # Taille des headers (nécessaire pour les tokens Keycloak) - large_client_header_buffers 4 32k; - - include /etc/nginx/conf.d/*.conf; -} From baa90fdc6d44af80528d230f5bb26f6b56056efc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 May 2026 13:43:44 +0000 Subject: [PATCH 2/5] chore(hotfix/switch-strangler-to-bitnami): Release v9.16.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5de0df1103..395145efc4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "9.16.1" + ".": "9.16.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8927a21e26..23335c6b98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [9.16.2](https://github.com/cloud-pi-native/console/compare/v9.16.1...v9.16.2) (2026-05-20) + + +### Bug Fixes + +* use bitnami image for strangler ([1c0ea16](https://github.com/cloud-pi-native/console/commit/1c0ea169ce221cb0bb7e73790b030032a8897260)) + ## [9.16.1](https://github.com/cloud-pi-native/console/compare/v9.16.0...v9.16.1) (2026-04-13) diff --git a/package.json b/package.json index 1b15e392ec..2244567d48 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@cpn-console/root", "type": "module", - "version": "9.16.1", + "version": "9.16.2", "private": true, "packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319", "repository": { From 804c7d4058854bc3a53a0af570e07805434a7df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20TR=C3=89BEL=20=28Perso=29?= Date: Thu, 21 May 2026 16:37:36 +0200 Subject: [PATCH 3/5] chore(client): explicitely add eslint as a devDep --- apps/client/package.json | 1 + pnpm-lock.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/apps/client/package.json b/apps/client/package.json index e04f914d1a..a470c55bfc 100644 --- a/apps/client/package.json +++ b/apps/client/package.json @@ -62,6 +62,7 @@ "@vitest/coverage-v8": "^2.1.9", "@vue/eslint-config-typescript": "^14.7.0", "chalk": "^5.6.2", + "eslint": "^10.1.0", "eslint-plugin-vue": "^10.8.0", "jsdom": "^25.0.1", "rimraf": "^6.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 920f2aca05..b77412182e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -141,6 +141,9 @@ importers: chalk: specifier: ^5.6.2 version: 5.6.2 + eslint: + specifier: ^10.1.0 + version: 10.1.0(jiti@2.6.1) eslint-plugin-vue: specifier: ^10.8.0 version: 10.8.0(@stylistic/eslint-plugin@5.10.0(eslint@10.1.0(jiti@2.6.1)))(@typescript-eslint/parser@8.57.0(eslint@10.1.0(jiti@2.6.1))(typescript@5.9.3))(eslint@10.1.0(jiti@2.6.1))(vue-eslint-parser@10.4.0(eslint@10.1.0(jiti@2.6.1))) From 918e9ccb2e622d2fb6d8fb7cee48dac43aef3cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20TR=C3=89BEL=20=28Perso=29?= Date: Thu, 21 May 2026 16:41:01 +0200 Subject: [PATCH 4/5] chore(client): fix custom role management --- .../client/src/components/ProjectRoleForm.vue | 91 +++++---- apps/client/src/views/ProjectDashboard.vue | 193 +++++++++++++----- 2 files changed, 187 insertions(+), 97 deletions(-) diff --git a/apps/client/src/components/ProjectRoleForm.vue b/apps/client/src/components/ProjectRoleForm.vue index d145bee1b9..ce466ec4f3 100644 --- a/apps/client/src/components/ProjectRoleForm.vue +++ b/apps/client/src/components/ProjectRoleForm.vue @@ -1,6 +1,12 @@ From 4a469cef181b1199cfebe0d22cd7793dd7549725 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 14:48:19 +0000 Subject: [PATCH 5/5] chore(hotfix/add-a-custom-role-banner): Release v9.16.3 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 395145efc4..36c864fdfc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "9.16.2" + ".": "9.16.3" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 23335c6b98..914a93036f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [9.16.3](https://github.com/cloud-pi-native/console/compare/v9.16.2...v9.16.3) (2026-05-21) + + +### Miscellaneous Chores + +* **client:** explicitely add eslint as a devDep ([804c7d4](https://github.com/cloud-pi-native/console/commit/804c7d4058854bc3a53a0af570e07805434a7df3)) +* **client:** fix custom role management ([918e9cc](https://github.com/cloud-pi-native/console/commit/918e9ccb2e622d2fb6d8fb7cee48dac43aef3cb0)) + ## [9.16.2](https://github.com/cloud-pi-native/console/compare/v9.16.1...v9.16.2) (2026-05-20) diff --git a/package.json b/package.json index 2244567d48..0ce659388f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@cpn-console/root", "type": "module", - "version": "9.16.2", + "version": "9.16.3", "private": true, "packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319", "repository": {