Aller au contenu

Réseau & Domaines

Sous-domaines production

Stack principale

Sous-domaine Service Port container
perfshop.perfshop.io perfshop-frontend 8090
perfshop-api.perfshop.io perfshop-app 8080
perfshop-monitoring.perfshop.io perfshop-monitoring 3001
perfshop-grafana.perfshop.io grafana 3002
perfshop-chaos.perfshop.io perfshop-chaos-admin 3003
perfshop-admin.perfshop.io perfshop-admin 3004
perfshop-doc.perfshop.io docs 8087

Stack JMeter

Sous-domaine Service Port container
perfshop-jmeter.perfshop.io perfshop-jmeter-ui 3005

Stack QA pédagogique (Phase 9 & 10)

Sous-domaine Service Port container
perfshop-squash.perfshop.io perfshop-testmgmt 8080
perfshop-selenium.perfshop.io perfshop-selenium VNC 7900
perfshop-files.perfshop.io perfshop-filebrowser 8080
perfshop-git.perfshop.io perfshop-forgejo 3000
perfshop-scripts.perfshop.io perfshop-scripts-ui 3008

Reverse proxy

Le reverse proxy Synology (DSM → Portail de connexion → Proxy inverse) gère le routage des sous-domaines vers les ports des containers.

Ajouter un sous-domaine

DSM → Panneau de configuration → Portail de connexion → Proxy inverse → Créer - Source : HTTPS — nouveau-sous-domaine.perfshop.io — port 443 - Destination : HTTP — localhost — port du container


CORS

Le CORS est configuré dans CorsConfig.java et lu depuis la variable CORS_ALLOWED_ORIGINS.

Local :

http://localhost:9091,http://localhost:3001,http://localhost:3003,http://localhost:3004

Production (dans .env.production) :

CORS_ALLOWED_ORIGINS=https://perfshop.perfshop.io,https://perfshop-api.perfshop.io,https://perfshop-monitoring.perfshop.io,https://perfshop-admin.perfshop.io,https://perfshop-chaos.perfshop.io


Communication interne entre services

Les services se parlent via leurs noms de container sur le réseau perfshop-network.

Depuis Vers URL interne
perfshop-scripts-ui perfshop-forgejo http://perfshop-forgejo:3000
perfshop-scripts-ui perfshop-test-runner docker exec perfshop-test-runner
perfshop-squash-seed perfshop-forgejo http://perfshop-forgejo:3000/perfshop-ci/
perfshop-squash-seed perfshop-testmgmt http://perfshop-testmgmt:8080/squash
perfshop-orchestrator perfshop-testmgmt http://perfshop-testmgmt:8080/squash
perfshop-orchestrator perfshop-test-runner SSH perfshop-test-runner:22
perfshop-app perfshop-tempo http://perfshop-tempo:4317 (OTLP gRPC)
perfshop-app perfshop-pyroscope http://perfshop-pyroscope:4040

Fins de ligne (Windows)

Le fichier .gitattributes force les fins de ligne LF sur tous les scripts .sh. Sans ça, Git sur Windows convertit en CRLF et Nginx refuse d'exécuter les scripts.

*.sh text eol=lf
*.yml text eol=lf
*.env text eol=lf