Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Explicitly define healthchecks in docker-compose config (#249)

Kevin Linf342aad534a8
diff --git a/profile/deploy.yml b/profile/deploy.yml
index 77aba409a..6bed8434c 100644
--- a/profile/deploy.yml
+++ b/profile/deploy.yml
@@ -87,6 +87,13 @@ services:
options:
max-size: 10m
+ healthcheck:
+ interval: 3s
+ timeout: 3s
+ start_period: 2s
+ retries: 30
+ test: ["CMD", "curl", "--fail", "--silent", "http://localhost:80"]
+
# The API gateway and Manager web application.
manager:
@@ -257,6 +264,13 @@ services:
# Resource limits
mem_reservation: 512m
+ healthcheck:
+ interval: 3s
+ timeout: 3s
+ start_period: 2s
+ retries: 120
+ test: ["CMD", "curl", "--fail", "--silent", "http://localhost:8080"]
+
# Configure logging of the container, see deployment/logging.properties
logging:
options:
@@ -311,6 +325,14 @@ services:
options:
max-size: 10m
+ healthcheck:
+ test: ["CMD", "curl", "--fail", "--silent", "http://localhost:8080/auth"]
+ interval: 3s
+ timeout: 3s
+ # This was 600s in the Dockerfile, but that seems way too long.
+ start_period: 60s
+ retries: 30
+
# Uncomment to support the IKEA TRÅDFRI protocol. USE AT YOUR OWN RISK.
# ports:
# - "8081:8080"
@@ -349,6 +371,13 @@ services:
options:
max-size: 10m
+ healthcheck:
+ interval: 3s
+ timeout: 3s
+ start_period: 2s
+ retries: 30
+ test: ["CMD", "gosu", "postgres", "pg_isready"]
+
# Uncomment to support the IKEA TRÅDFRI protocol. USE AT YOUR OWN RISK.
# ports:
# - "5432:5432"