From a4ef82b68fadff42ea9a4fab0dc9c2424d821c9e Mon Sep 17 00:00:00 2001 From: Debian Dev4 Date: Wed, 1 Oct 2025 20:58:08 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20docker=5Ftag=3Ddev-test=20-=20Mise=20?= =?UTF-8?q?=C3=A0=20jour=20documentation=20et=20standardisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .cursorignore | 89 +++++++++++-- .dockerignore | 88 ++++++++++-- .gitignore | 107 ++++++++++----- src/front/Api/Auth/IdNot/index.ts | 2 +- src/front/Api/BaseApiService.ts | 2 +- .../Layouts/Login/StepEmail/index.tsx | 2 +- temp.yaml | 126 ------------------ 7 files changed, 232 insertions(+), 184 deletions(-) delete mode 100644 temp.yaml diff --git a/.cursorignore b/.cursorignore index 1973f6db..d07058b9 100644 --- a/.cursorignore +++ b/.cursorignore @@ -1,10 +1,79 @@ -# Cursor ignore file for lecoffre-front -node_modules/ -.next/ -dist/ -*.log -.env* -.DS_Store -coverage/ -build/ -out/ +# 4NK Environment - Git Ignore +# ============================ +confs/ +# Dossiers de sauvegarde des scripts +**/backup/ +**/*backup* + +**/.cargo/ + +# Fichiers temporaires +**/*.tmp* +**/*.temp* +**/*.log* +**/*.pid* + +# Fichiers de configuration locale +**/*.env* +**/*.conf* +**/*.yaml* +**/*.yml* +**/*.ini* +**/*.json* +**/*.toml* +**/*.lock* + +# Données et logs +**/*.logs* +**/*.data +*.db +*.sqlite + +# Certificats et clés +**/*.key +**/*.pem +**/*.crt +**/*.p12 +**/*.pfx +ssl/ +certs/ + +# Docker +**/*.docker* + +# Cache et build +**/*.node_modules/ +**/*.dist/ +**/*build/ +**/*target/ +**/*.*.o +**/*.so +**/*.dylib + +# IDE et éditeurs +**/*.vscode/ +**/*.idea/ +**/*.swp +**/*.swo +**/*~ + +# OS +**/*.DS_Store +**/*Thumbs.db +**/*tmp* + +# Git +**/*.git/ +**/*.orig* + +# Backup des projets existants +**/*backup* + + +**/*wallet* +**/*keys* + +**/*node_modules* +**/*cursor* +**/*pid* +**/*next* \ No newline at end of file diff --git a/.dockerignore b/.dockerignore index 8a988474..d07058b9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,11 +1,79 @@ -.git -node_modules -.next -coverage -dist -.DS_Store -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.env* +# 4NK Environment - Git Ignore +# ============================ +confs/ +# Dossiers de sauvegarde des scripts +**/backup/ +**/*backup* +**/.cargo/ + +# Fichiers temporaires +**/*.tmp* +**/*.temp* +**/*.log* +**/*.pid* + +# Fichiers de configuration locale +**/*.env* +**/*.conf* +**/*.yaml* +**/*.yml* +**/*.ini* +**/*.json* +**/*.toml* +**/*.lock* + +# Données et logs +**/*.logs* +**/*.data +*.db +*.sqlite + +# Certificats et clés +**/*.key +**/*.pem +**/*.crt +**/*.p12 +**/*.pfx +ssl/ +certs/ + +# Docker +**/*.docker* + +# Cache et build +**/*.node_modules/ +**/*.dist/ +**/*build/ +**/*target/ +**/*.*.o +**/*.so +**/*.dylib + +# IDE et éditeurs +**/*.vscode/ +**/*.idea/ +**/*.swp +**/*.swo +**/*~ + +# OS +**/*.DS_Store +**/*Thumbs.db +**/*tmp* + +# Git +**/*.git/ +**/*.orig* + +# Backup des projets existants +**/*backup* + + +**/*wallet* +**/*keys* + +**/*node_modules* +**/*cursor* +**/*pid* +**/*next* \ No newline at end of file diff --git a/.gitignore b/.gitignore index a356b55b..d07058b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,79 @@ -# Secrets et fichiers sensibles -.env -.env.* -!.env.example -!.env.exemple -*.key -*.pem -secrets/ +# 4NK Environment - Git Ignore +# ============================ +confs/ +# Dossiers de sauvegarde des scripts +**/backup/ +**/*backup* -# Logs -logs/ -*.log +**/.cargo/ -.cargo/ -Cargo.lock -*/.cargo/ -*/Cargo.lock -# Node.js -node_modules/ -npm-debug.log* -yarn-debug.log* -yarn-error.log* +# Fichiers temporaires +**/*.tmp* +**/*.temp* +**/*.log* +**/*.pid* -# Next.js -.next/ -out/ -build/ -dist/ +# Fichiers de configuration locale +**/*.env* +**/*.conf* +**/*.yaml* +**/*.yml* +**/*.ini* +**/*.json* +**/*.toml* +**/*.lock* -# IDE -.vscode/ -.idea/ -*.swp -*.swo +# Données et logs +**/*.logs* +**/*.data +*.db +*.sqlite + +# Certificats et clés +**/*.key +**/*.pem +**/*.crt +**/*.p12 +**/*.pfx +ssl/ +certs/ + +# Docker +**/*.docker* + +# Cache et build +**/*.node_modules/ +**/*.dist/ +**/*build/ +**/*target/ +**/*.*.o +**/*.so +**/*.dylib + +# IDE et éditeurs +**/*.vscode/ +**/*.idea/ +**/*.swp +**/*.swo +**/*~ # OS -.DS_Store -Thumbs.db +**/*.DS_Store +**/*Thumbs.db +**/*tmp* -# Temporary files -tmp/ -*.tmp.cursor-server +# Git +**/*.git/ +**/*.orig* + +# Backup des projets existants +**/*backup* + + +**/*wallet* +**/*keys* + +**/*node_modules* +**/*cursor* +**/*pid* +**/*next* \ No newline at end of file diff --git a/src/front/Api/Auth/IdNot/index.ts b/src/front/Api/Auth/IdNot/index.ts index cffd2349..04dfa46c 100644 --- a/src/front/Api/Auth/IdNot/index.ts +++ b/src/front/Api/Auth/IdNot/index.ts @@ -43,7 +43,7 @@ export default class Auth extends BaseApiService { method: 'POST', headers: { 'Content-Type': 'application/json', - 'X-Request-ID': `front_${Math.random().toString(36).slice(2)}`, + 'X-Session-ID': `front_${Math.random().toString(36).slice(2)}`, }, body: JSON.stringify({ next_url: nextUrl }) }); diff --git a/src/front/Api/BaseApiService.ts b/src/front/Api/BaseApiService.ts index 84ac903d..aba6fc1b 100644 --- a/src/front/Api/BaseApiService.ts +++ b/src/front/Api/BaseApiService.ts @@ -42,7 +42,7 @@ export default abstract class BaseApiService { // Toujours annoncer qu'on attend du JSON côté front pour les appels API headers.set("Accept", "application/json"); // Propager un identifiant de requête pour corrélation côté proxy/backend - headers.set("X-Request-ID", `front_${Math.random().toString(36).slice(2)}`); + headers.set("X-Session-ID", `front_${Math.random().toString(36).slice(2)}`); headers.set("Authorization", `Bearer ${token}`); return headers; } diff --git a/src/front/Components/Layouts/Login/StepEmail/index.tsx b/src/front/Components/Layouts/Login/StepEmail/index.tsx index 784e95e3..2bdeb9cf 100644 --- a/src/front/Components/Layouts/Login/StepEmail/index.tsx +++ b/src/front/Components/Layouts/Login/StepEmail/index.tsx @@ -61,7 +61,7 @@ export default function StepEmail(props: IProps) { headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', - 'X-Request-ID': `front_${Math.random().toString(36).slice(2)}`, + 'X-Session-ID': `front_${Math.random().toString(36).slice(2)}`, }, body: JSON.stringify({ next_url: nextUrl }) }); diff --git a/temp.yaml b/temp.yaml deleted file mode 100644 index 6db74af0..00000000 --- a/temp.yaml +++ /dev/null @@ -1,126 +0,0 @@ ---- -# Source: leCoffre-front/templates/service-account.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: lecoffre-front-sa ---- -# Source: leCoffre-front/templates/service-account.yaml -apiVersion: v1 -kind: Secret -metadata: - name: lecoffre-front-sa-token - annotations: - kubernetes.io/service-account.name: lecoffre-front-sa -type: kubernetes.io/service-account-token ---- -# Source: leCoffre-front/templates/lecoffre-front.yaml -apiVersion: v1 -kind: Service -metadata: - name: lecoffre-front-svc - namespace: lecoffre - labels: -spec: - ports: - - port: 80 - name: http - targetPort: 3000 - selector: - app: lecoffre-front ---- -# Source: leCoffre-front/templates/lecoffre-front.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: lecoffre-front - namespace: lecoffre - labels: - app: lecoffre-front -spec: - replicas: 1 - selector: - matchLabels: - app: lecoffre-front - template: - metadata: - annotations: - vault.hashicorp.com/agent-inject: "true" - vault.hashicorp.com/agent-inject-secret-envs: secret/data/lecoffre-front-stg/config/envs - vault.hashicorp.com/agent-inject-template-envs: | - {{ with secret "secret/data/lecoffre-front-stg/config/envs" }} - {{ range $k, $v := .Data.data }} - export {{ $k }}="{{ $v }}" - {{ end }} - {{ end }} - vault.hashicorp.com/agent-pre-populate-only: "true" - vault.hashicorp.com/role: custom_lecoffre-front_injector_rol - labels: - app: lecoffre-front - spec: - serviceAccountName: lecoffre-front-sa - imagePullSecrets: - - name: docker-pull-secret - containers: - - name: lecoffre-front - image: "rg.fr-par.scw.cloud/lecoffre/front:v0.1.9" - - resources: - limits: - memory: 2Gi - requests: - cpu: 200m - memory: 1Gi - - imagePullPolicy: Always - command: ['sh', '-c', '. /vault/secrets/envs && npm run start'] ---- -# Source: leCoffre-front/templates/lecoffre-front.yaml -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: lecoffre-front - namespace: lecoffre - - annotations: - cert-manager.io/cluster-issuer: letsencrypt-prod - kubernetes.io/ingress.class: nginx - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - nginx.ingress.kubernetes.io/from-to-www-redirect: "true" - -spec: - tls: - - hosts: [app.stg.lecoffre.smart-chain.fr] - secretName: app-tls - rules: - - host: app.stg.lecoffre.smart-chain.fr - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: lecoffre-front-svc - port: - number: 80 ---- -# Source: leCoffre-front/templates/docker-pull-secret.yaml -apiVersion: external-secrets.io/v1beta1 -kind: ExternalSecret -metadata: - name: docker-pull-secret -spec: - refreshInterval: 1h - secretStoreRef: - name: dockerpullsecret-vault-cluster-secret-store - kind: ClusterSecretStore - target: - template: - type: kubernetes.io/dockerconfigjson - name: docker-pull-secret - creationPolicy: Owner - data: - - secretKey: .dockerconfigjson - remoteRef: - key: secret/data/lecoffre-front-stg/config/dockerpullsecret - property: .dockerconfigjson