Skip to content

Commit

Permalink
Merge pull request #9 from wedeploy-examples/add-health-check
Browse files Browse the repository at this point in the history
Adds healthCheck
  • Loading branch information
Albertinin Mourato Santos authored Feb 11, 2019
2 parents 978313d + 10ee9fa commit 04d56bd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions db/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mysql:5.5

COPY --from=healthcheck/mysql:latest /usr/local/bin/docker-healthcheck /usr/local/bin/

HEALTHCHECK CMD ["docker-healthcheck"]
1 change: 0 additions & 1 deletion db/wedeploy.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"id": "db",
"image": "mysql:5.5",
"env": {
"MYSQL_ROOT_PASSWORD": "passw0rd"
},
Expand Down
5 changes: 4 additions & 1 deletion dbadmin/wedeploy.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"id": "dbadmin",
"id": "admin",
"image": "adminer:4.3",
"healthCheck": {
"url": "localhost:8080"
},
"dependencies": ["db"]
}
9 changes: 6 additions & 3 deletions wp/wedeploy.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
"id": "wp",
"healthCheck": {
"url": "localhost"
},
"env": {
"WORDPRESS_DB_HOST": "db",
"WORDPRESS_DB_USER": "root",
"WORDPRESS_DB_PASSWORD": "passw0rd",
"WORDPRESS_DB_NAME": "wordpress"
"WORDPRESS_DB_PASSWORD": "passw0rd"
},
"dependencies": ["db"]
"dependencies": ["db"],
"zeroDowntime": true
}

0 comments on commit 04d56bd

Please sign in to comment.