From 57dad564a6df35ea488fab40fa9798511036d4ac Mon Sep 17 00:00:00 2001 From: whoswhip Date: Tue, 30 Dec 2025 21:25:25 -0500 Subject: [PATCH] feat: add health checks for backend and frontend services in docker-compose.yml --- docker-compose.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index c06f840..fe3f206 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,12 @@ services: - sharpbin-net expose: - "8080" + healthcheck: + test: 'wget --no-verbose --spider http://localhost:8080/health || exit 1' + interval: 30s + timeout: 30s + retries: 5 + start_period: 30s restart: unless-stopped frontend: @@ -29,6 +35,15 @@ services: - "5173:5173" networks: - sharpbin-net + healthcheck: + test: 'wget --no-verbose --spider http://localhost:5173/health || exit 1' + interval: 30s + timeout: 30s + retries: 5 + start_period: 30s + depends_on: + backend: + condition: service_healthy restart: unless-stopped volumes: