Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix: add healthcheck for db and remove unwanted volumes (#3150)
NicklasWallgren9402bb9285cf
diff --git a/docker-compose.yml b/docker-compose.ymlindex 417b15002..8c948fcd0 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -19,10 +19,12 @@ services:- DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300- PORT=3000volumes:- - ./packages/hoppscotch-backend/:/usr/src/app+ # Uncomment the line below when modifying code. Only applicable when using the "dev" target.+ # - ./packages/hoppscotch-backend/:/usr/src/app- /usr/src/app/node_modules/depends_on:- - hoppscotch-db+ hoppscotch-db:+ condition: service_healthyports:- "3170:3000"@@ -60,12 +62,20 @@ services:# you are using an external postgres instance# This will be exposed at port 5432hoppscotch-db:- image: postgres+ image: postgres:15ports:- "5432:5432"+ user: postgresenvironment:+ # The default user defined by the docker image+ POSTGRES_USER: postgres# NOTE: Please UPDATE THIS PASSWORD!POSTGRES_PASSWORD: testpassPOSTGRES_DB: hoppscotch+ healthcheck:+ test: ["CMD-SHELL", "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"]+ interval: 5s+ timeout: 5s+ retries: 10