File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,9 @@ lambda:
303303 - curl
304304 - -I
305305 - http://localhost:8080
306+ interval: 1s
307+ timeout: 1s
308+ retries: 30
306309```
307310
308311> [!TIP]
@@ -343,12 +346,32 @@ services:
343346 # ... existing config
344347```
345348
349+ > [ !NOTE]
350+ > As we have the healthceck in place, we can actually tell the ` curl ` container not to start until it gets that healthy response.
351+
352+ ### Try running the stack
353+
354+ Run the following command:
355+
356+ ``` shell
357+ docker compose up
358+ ```
359+
360+ > [ !WARNING]
361+ > The problem with this specific command is that the Lambda continues to run despite the cURL container running and exiting.
362+ > ** Exit your container by pressing Ctrl+C on your keyboard.**
363+
346364### Run the stack
347365
366+ Run the following command:
367+
348368``` shell
349- docker compose up --build -- abort-on-container-exit
369+ docker compose up --abort-on-container-exit
350370```
351371
372+ > [ !TIP]
373+ > With this extra attribute, we've told Docker to terminate all other running containers when one exits.
374+
352375---
353376
354377## 4: Developer experience
You can’t perform that action at this time.
0 commit comments