Skip to content

Commit 857f416

Browse files
authored
Merge pull request #1538 from mnfst/fix/docker-healthcheck-start-period
fix(docker): healthcheck never transitions to healthy
2 parents 4043fae + ef7dff7 commit 857f416

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ COPY packages/backend/package.json packages/backend/
7171

7272
EXPOSE 3001
7373

74-
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
74+
HEALTHCHECK --interval=30s --timeout=5s --start-period=45s --retries=3 \
7575
CMD wget -qO- http://127.0.0.1:3001/api/v1/health || exit 1
7676

7777
USER node

docker/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ services:
1313
depends_on:
1414
postgres:
1515
condition: service_healthy
16+
healthcheck:
17+
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3001/api/v1/health || exit 1"]
18+
interval: 30s
19+
timeout: 5s
20+
start_period: 45s
21+
retries: 3
1622
read_only: true
1723
tmpfs:
1824
- /tmp

0 commit comments

Comments
 (0)