Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚦 Mise en place de deux domaines sur toute la stack : locale, CI, staging #1321

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fabienheureux
Copy link
Member

@fabienheureux fabienheureux commented Feb 5, 2025

Description succincte du problème résolu

En lien avec https://www.notion.so/accelerateur-transition-ecologique-ademe/Si-iFram-et-que-je-clique-dans-une-fiche-produit-sur-le-logo-a-revient-la-page-d-accueil-mais-av-17b6523d57d7800ea4dbe206b5af86b5?pvs=4

🗺️ contexte: on utilise deux domaines en prod, on souhaite répliquer ce système

💡 quoi: définition de domaines assistant.dev et lvao.dev pour atteindre les webapps en local

🎯 pourquoi:

  • faciliter la résolution de bugs se produisant actuellement en prod
  • unifier les environnements de dev / staging / prod

🤔 comment:

  • ajout d'un nginx en local
  • définition de domaines custom en local pour travailler sur lvao et l'assistant
  • ajout de nginx dans les GitHub Actions

Note : j'en ai profité pour ajouter un lancement conditionnel des test e2e, en la présence du tag frontend ils se lanceront.

⚠️ À FAIRE EN LOCAL

sudo echo "127.0.0.1 lvao.dev" >> /etc/hosts
sudo echo "127.0.0.1 assistant.dev" >> /etc/hosts

Sur MacOS il peut être requis de rafraîchir des choses :

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Auto-review

Les trucs à faire avant de demander une review :

  • J'ai bien relu mon code
  • La CI passe bien
  • En cas d'ajout de variable d'environnement, j'ai bien mis à jour le .env.template
  • J'ai ajouté des tests qui couvrent le nouveau code

✅ Reste à faire (PR en cours)

  • DO-CU-MEN-TER

📆 A faire (prochaine PR)

  • réparer les e2e

Copy link

gitguardian bot commented Feb 13, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@fabienheureux fabienheureux force-pushed the improve-dual-domain-setup branch from 2d4ea2a to f9606fa Compare February 17, 2025 12:46
@fabienheureux fabienheureux changed the title Improve dual domain setup Mise en place de deux domaines sur toute la stack : locale, CI, staging Feb 17, 2025
@fabienheureux fabienheureux marked this pull request as ready for review February 17, 2025 15:40
@fabienheureux fabienheureux requested a review from a team as a code owner February 17, 2025 15:40
@fabienheureux fabienheureux requested review from kolok and maxcorbeau and removed request for a team February 17, 2025 15:40
Comment on lines 94 to 104
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.0.1 lvao.dev" | sudo tee -a /etc/hosts
- run: >-
docker run -d -p 80:80
-v ${{ github.workspace }}/nginx/servers.conf:/etc/nginx/servers.conf:ro
-v ${{ github.workspace }}/nginx/certs:/etc/nginx/ssl
--add-host=host.docker.internal:host-gateway
-e GITHUB_ACTIONS=true -e CI=true nginx:1.18
# --health-cmd "curl -fs https://assistant.dev"
# --health-interval 2s --health-timeout 5s --health-retries 5
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dysfonctionnel, à finir à mon retour de vacances

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

à supprimer du repo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voir pour mutualiser les deux confs

@fabienheureux fabienheureux force-pushed the improve-dual-domain-setup branch from d24f467 to 791a85e Compare February 18, 2025 15:06
@fabienheureux fabienheureux force-pushed the improve-dual-domain-setup branch 3 times, most recently from e92a614 to fe58963 Compare February 18, 2025 15:42
Copy link
Contributor

@maxcorbeau maxcorbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bcp + agréable en effet d'être sur des noms significatifs que sur du localhost/127 merci bien👏

@fabienheureux fabienheureux force-pushed the improve-dual-domain-setup branch from 98ed192 to dc68ed3 Compare February 20, 2025 15:42
@fabienheureux fabienheureux force-pushed the improve-dual-domain-setup branch from dc68ed3 to de59458 Compare February 20, 2025 15:43
@fabienheureux fabienheureux changed the title Mise en place de deux domaines sur toute la stack : locale, CI, staging 🚦 Mise en place de deux domaines sur toute la stack : locale, CI, staging Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants