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
[#221] [TECH] Utilisation d'un "subdir buildpack" pour séparer le déploiement des 3 applications #221
Conversation
I'm deploying this PR to these urls:
Please check it out |
1 similar comment
I'm deploying this PR to these urls:
Please check it out |
1d8ee00
to
cc82452
Compare
I'm deploying this PR to these urls:
Please check it out |
cc82452
to
5da4894
Compare
I'm deploying this PR to these urls:
Please check it out |
5da4894
to
00d4abb
Compare
I'm deploying this PR to these urls:
Please check it out |
00d4abb
to
1f347d7
Compare
I'm deploying this PR to these urls:
Please check it out |
dad1d9e
to
31fe2e1
Compare
I'm deploying this PR to these urls:
Please check it out |
1 similar comment
I'm deploying this PR to these urls:
Please check it out |
@@ -0,0 +1,52 @@ | |||
#!/bin/bash -e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne comprends pas l'usage de ce fichier. C'est que pour les tests ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oui, c’est un script qu’on peut lancer en local (à condition d’avoir Docker) pour tester le déploiement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pour info, mes notes sur ce sujet :
31fe2e1
to
fda1144
Compare
I'm deploying this PR to these urls:
Please check it out |
Pour info, j'ai remanié le |
fda1144
to
d3cd929
Compare
I'm deploying this PR to these urls:
Please check it out |
d3cd929
to
7efe3e1
Compare
I'm deploying this PR to these urls:
Please check it out |
The following commands need to be run (adjusting the app names) to adjust the Scalingo environment variables to deploy this correctly: scalingo env-set -a pix-app-integration BUILDPACK_URL=https://github.com/1024pix/subdir-buildpack scalingo env-set -a pix-app-integration BUILDPACK_SUBDIR=mon-pix scalingo env-set -a pix-orga-integration BUILDPACK_URL=https://github.com/1024pix/subdir-buildpack scalingo env-set -a pix-orga-integration BUILDPACK_SUBDIR=orga scalingo env-set -a pix-api-integration BUILDPACK_URL=https://github.com/1024pix/subdir-buildpack scalingo env-set -a pix-api-integration BUILDPACK_SUBDIR=api
7efe3e1
to
c0cc875
Compare
I'm deploying this PR to these urls:
Please check it out |
Nous déployons sur Scalingo ce repo sur 3 applications différentes (
pix-app-*
pour le répertoiremon-pix
,pix-api-*
pourapi
etpix-orga-*
pourorga
).Actuellement, le déploiement pour les trois applications commence à la racine du repo et on utilise la variable
APPLICATION_NAME
pour avoir un comportement différent selon l'application à déployer. En particulier on utilise les mêmes buildpacks (nodejs
etnginx
) pour les trois applications alors que par exemple, l'applicationapi
n'a pas besoin denginx
. Et pour les applications utilisantnginx
on se retrouve à devoir démarrernginx
depuis un script dupackage.json
(cf. https://github.com/1024pix/pix/blob/31cdf4e/scripts/start_scalingo_nginx.sh) parce que c'est le buildpacknodejs
qui a la main.Cette PR propose d'utiliser un buildpack (créé pour l'occasion, à partir de deux autres au fonctionnement quasiment approprié : https://github.com/1024pix/subdir-buildpack ) qui va permettre de traiter chacun des trois sous-répertoires (
api
,mon-pix
etorga
) comme une application déployable isolément. Ainsi chaque application peut utiliser ses propres buildpacks sans interférer avec les autres.Note :
Pour pouvoir déployer ce changement il faudra mettre à jour quelques variables d'environnement sur les applications Scalingo. Voici les commandes à lancer pour mettre à jour les applications d'intégration :
Et pour la production :