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

Group 1 PR #152

Open
wants to merge 1 commit into
base: ensf400_w24
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,11 @@ services:
stdin_open: true
tty: true
command: ["/bin/bash"]


#This can help Docker automatically handle container failures and restart unhealthy containers.
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
Comment on lines +44 to +51
Copy link
Collaborator

Choose a reason for hiding this comment

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

indentaion level is as if it is a service. To apply this heathcheck to a service it must me indented just like image or environmnet is. The suggested code change below would apply the health check to the app2 service

Suggested change
#This can help Docker automatically handle container failures and restart unhealthy containers.
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# This can help Docker automatically handle container failures and restart unhealthy containers.
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/ || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s