Skip to content

Commit aec7cf1

Browse files
Add healthcheck to api service
docker compose up was failing to start the api service. Added a healthcheck to the service to allow it to start properly. ```bash ❯ docker compose up genai-stack-pull-model-1 exited with code 0 dependency failed to start: container genai-stack-api-1 has no healthcheck configured ```
1 parent 5883958 commit aec7cf1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ services:
189189
- front-end/
190190
ports:
191191
- 8504:8504
192+
healthcheck:
193+
test: ["CMD-SHELL", "wget --no-verbose --tries=1 http://localhost:8504/ || exit 1"]
194+
interval: 5s
195+
timeout: 3s
196+
retries: 5
192197

193198
front-end:
194199
build:

0 commit comments

Comments
 (0)