setable timeout
Build and Push Docker Images / build-and-push (push) Successful in 24s

This commit is contained in:
2025-07-12 17:48:26 +02:00
parent 2f724d0c1f
commit 8ce6428149
+3 -1
View File
@@ -32,6 +32,7 @@ class PuppeteerHealthcheck:
self.target_container = os.getenv('TARGET_CONTAINER', 'puppeteer-api') self.target_container = os.getenv('TARGET_CONTAINER', 'puppeteer-api')
self.check_interval = int(os.getenv('CHECK_INTERVAL', '60')) self.check_interval = int(os.getenv('CHECK_INTERVAL', '60'))
self.max_consecutive_failures = int(os.getenv('MAX_CONSECUTIVE_FAILURES', '3')) self.max_consecutive_failures = int(os.getenv('MAX_CONSECUTIVE_FAILURES', '3'))
self.timeout = int(os.getenv('TIMEOUT', '20'))
# Initialize Docker client with proper error handling # Initialize Docker client with proper error handling
self.docker_client = self._initialize_docker_client() self.docker_client = self._initialize_docker_client()
@@ -41,6 +42,7 @@ class PuppeteerHealthcheck:
logger.info(f" Test URL: {self.test_url}") logger.info(f" Test URL: {self.test_url}")
logger.info(f" Target Container: {self.target_container}") logger.info(f" Target Container: {self.target_container}")
logger.info(f" Check Interval: {self.check_interval} seconds") logger.info(f" Check Interval: {self.check_interval} seconds")
logger.info(f" Timeout: {self.timeout} seconds")
def _initialize_docker_client(self): def _initialize_docker_client(self):
"""Initialize Docker client with proper error handling""" """Initialize Docker client with proper error handling"""
@@ -81,7 +83,7 @@ class PuppeteerHealthcheck:
response = requests.get( response = requests.get(
url, url,
headers=headers, headers=headers,
timeout=30, timeout=self.timeout,
allow_redirects=True allow_redirects=True
) )