Skip to content

Commit e293c06

Browse files
TamTunnelTamTunnel
authored andcommitted
Switch to TCP socket health checks for backend services
1 parent 964ea86 commit e293c06

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docker-compose.prod.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ services:
6464
redis:
6565
condition: service_healthy
6666
healthcheck:
67-
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8001/health')"]
67+
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', 8001), timeout=2)"]
6868
interval: 10s
6969
timeout: 5s
7070
retries: 5
71-
start_period: 60s
71+
start_period: 30s
7272
restart: unless-stopped
7373

7474
# Routing Service
@@ -87,11 +87,11 @@ services:
8787
redis:
8888
condition: service_healthy
8989
healthcheck:
90-
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8002/health')"]
90+
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', 8002), timeout=2)"]
9191
interval: 10s
9292
timeout: 5s
9393
retries: 5
94-
start_period: 60s
94+
start_period: 30s
9595
restart: unless-stopped
9696

9797
# Ground Scheduler Service
@@ -113,11 +113,11 @@ services:
113113
core-orbits:
114114
condition: service_healthy
115115
healthcheck:
116-
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8003/health')"]
116+
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', 8003), timeout=2)"]
117117
interval: 10s
118118
timeout: 5s
119119
retries: 5
120-
start_period: 60s
120+
start_period: 30s
121121
restart: unless-stopped
122122

123123
# AI Agents Service
@@ -135,11 +135,11 @@ services:
135135
ground-scheduler:
136136
condition: service_healthy
137137
healthcheck:
138-
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8004/health')"]
138+
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('127.0.0.1', 8004), timeout=2)"]
139139
interval: 10s
140140
timeout: 5s
141141
retries: 5
142-
start_period: 60s
142+
start_period: 30s
143143
restart: unless-stopped
144144

145145
# Frontend

0 commit comments

Comments
 (0)