Skip to content

Commit 84d192e

Browse files
committed
update sample docker setup to install curl and use it for healthcheck
1 parent b1a2629 commit 84d192e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

starter-sample/app/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
FROM node:20-bookworm-slim
66

7+
RUN apt-get update -qq \
8+
&& apt-get install -y curl \
9+
&& apt-get clean \
10+
&& rm -rf /var/lib/apt/lists/*
11+
712
WORKDIR /app
813

914
COPY package*.json ./

starter-sample/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ services:
1616
healthcheck:
1717
# wget or curl required for healthchecks on services with a published port
1818
# this gets parsed by Defang and provided to the load balancers as well
19-
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"]
19+
test: ["CMD", "curl", "-f", "http://localhost:3000/"]

0 commit comments

Comments
 (0)