File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff 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
310330Update ` docker-compose.yaml` (in the root) to include a service that triggers our Lambda.
You can’t perform that action at this time.
0 commit comments