-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding initialization, build and test scripts. Modifying mysql host name on hibernate.cfg.xml. Adding healthcheck param on docker-compose. #4
Conversation
…ame on hibernate.cfg.xml. Adding healthcheck param on docker-compose.
run.ps1
Outdated
@@ -0,0 +1,2 @@ | |||
echo "Booting docker-compose production file" |
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.
Acho melhor deixar esses scripts em uma pasta separada. Uma pasta scripts
talvez
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.
Consider it done as well!
build.ps1
Outdated
@@ -0,0 +1,15 @@ | |||
echo "Stopping all running docker containers" |
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.
Acho melhor deixar esses scripts em uma pasta separada. Uma pasta scripts
talvez
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.
Consider it done!
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.
LGTM
docker/docker-compose.yml
Outdated
@@ -25,6 +25,11 @@ services: | |||
build: ../backend/ | |||
ports: | |||
- 8090:8080 | |||
healthcheck: |
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.
O healthcheck
tem que ser feito no mysql e o backend tem que ser iniciado apenas se condition: service_healthy
Vi que esse o depends_on
com condition
só funciona nas versões 2.x do docker-compose por uma incompatibilidade com o docker swarm.
Acho melhor usar a versão 2.x então, igual esse exemplo do StackOverflow
Vou alterar aqui e já mando um commit nessa branch pra aparecer nesse PR.
Conforme comentado, movi os scripts para uma pasta separada, aproveitei para criar scripts shell. |
Adding initialization, build and test scripts. Modifying mysql host name on hibernate.cfg.xml. Adding healthcheck param on docker-compose.