Skip to content

Commit 636a4de

Browse files
committed
Update README.md
1 parent ff06954 commit 636a4de

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,26 @@ lambda:
305305
- http://localhost:8080
306306
```
307307
308+
> [!TIP]
309+
> The healthcheck allows Docker (and us) to know when a container is up and running as expected.
310+
> If you were to run `docker ps` in a different terminal window while our containers were starting up you might see the following:
311+
>
312+
> ```shell
313+
> $ docker ps
314+
> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
315+
> bf2696aeaabf solution-lambda "/lambda-entrypoint.…" 1 second ago Up Less than a second (health: starting) your-lambda-1
316+
> ```
317+
>
318+
> If you ran `docker ps` once the container was able to pass the healthcheck you would hopefully see the following:
319+
>
320+
> ```shell
321+
> $ docker ps
322+
> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
323+
> bf2696aeaabf solution-lambda "/lambda-entrypoint.…" 36 seconds ago Up 35 seconds (healthy) your-lambda-1
324+
> ```
325+
>
326+
> _If the container wasn't able to pass the healthcheck then you would eventually see `unhealthy` instead._
327+
308328
### Add cURL service
309329
310330
Update `docker-compose.yaml` (in the root) to include a service that triggers our Lambda.

0 commit comments

Comments
 (0)