chore: add healthcheck for simulated-webhook-receiver (#3702)

* chore: add healthcheck for simulated-webhook-receiver
* chore: wait for simulated-webhook-receiver to be healthy before starting backend
This commit is contained in:
David Germain
2024-06-27 16:31:53 +02:00
committed by GitHub
parent 8b8c7cc5b5
commit 8e2432e8ed
2 changed files with 6 additions and 0 deletions

View File

@@ -7,6 +7,9 @@ services:
build: build:
context: ./ context: ./
dockerfile: ./functions/emulator/Dockerfile dockerfile: ./functions/emulator/Dockerfile
depends_on:
simulated-webhook-receiver:
condition: service_healthy
ports: ports:
- 4001-4008:4001-4008 - 4001-4008:4001-4008
volumes: volumes:

View File

@@ -17,10 +17,13 @@ WORKDIR /app
RUN \ RUN \
apt-get update && \ apt-get update && \
apt-get -y install curl && \
# For debugging # For debugging
apt-get -y install nano && \ apt-get -y install nano && \
apt-get clean apt-get clean
HEALTHCHECK CMD curl --fail http://localhost:30102/health || exit 1
COPY ./package.json ./package.json COPY ./package.json ./package.json
RUN yarn install RUN yarn install