Skip to content

Commit

Permalink
Alterado healthcheck para o servico do mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
helton committed Sep 1, 2018
1 parent afd679f commit 0f7e1b2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docker/docker-compose.yml
@@ -1,14 +1,18 @@
version: "3.1"
version: "2.1"

services:
mysql:
db:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: k2j32ks4
MYSQL_ROOT_PASSWORD: k2j32ks4
ports:
- 3306:3306
volumes:
- ../db:/docker-entrypoint-initdb.d
healthcheck:
test: mysql --user=root --password=k2j32ks4 -e 'SHOW DATABASES'
timeout: 20s
retries: 10
networks:
- greatquotes

Expand All @@ -17,21 +21,17 @@ services:
ports:
- 8085:8080
depends_on:
- mysql
- db
networks:
- greatquotes

backend:
build: ../backend/
ports:
- 8090:8080
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 1s
timeout: 3s
retries: 60
depends_on:
- mysql
db:
condition: service_healthy
networks:
- greatquotes

Expand Down

1 comment on commit 0f7e1b2

@siriusgomes
Copy link
Collaborator

Choose a reason for hiding this comment

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

Boa! No finalzinho da sexta reparei que coloquei o healthcheck no contêiner errado mesmo, valeu!

Please sign in to comment.