Skip to content

Lab 03: many containers with Docker Compose - #17

Merged
aprojic merged 5 commits into
mainfrom
lab-03-compose
Oct 11, 2026
Merged

aprojic merged 5 commits into
mainfrom
lab-03-compose

Conversation

@aprojic

@aprojic aprojic commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

New Lab 03 replacing the coming soon row.

  • lab-03-compose/app/: Flask visit counter + Redis, Dockerfile (python:3.14-slim, as Lab 02), compose.yaml without the obsolete version: key, healthcheck + depends_on: service_healthy, named volume.
  • Parts: up + .env → what Compose created (network, volume, service-name DNS, Redis auth warning) → restart vs down vs down -v → cleanup.
  • Evidence: page shows name, visit count, web hostname and CODESPACE_NAME; table of counts/hostnames across the three commands; short answers incl. why --scale web=3 clashes on port 80 (bridge to lecture 4).
  • app.py exits on SIGTERM: as PID 1, Python ignored it and every down/restart waited 10 s for the kill.
  • Root README: lab table row and port note.

Tested: every command run verbatim in this repo's dev container (@devcontainers/cli, Ubuntu 24.04 + docker-in-docker:4, Docker Compose v5.6.0); expected outputs come from that run. Not observed in a real Codespace (the image has no sshd for gh codespace ssh): the forwarded address and the real CODESPACE_NAME value.

…RM so down/restart don't wait 10 s

Signed-off-by: Ante Projić <[email protected]>
…y-one, scale as evidence, volume time as own data)

Signed-off-by: Ante Projić <[email protected]>
@aprojic
aprojic marked this pull request as ready for review October 11, 2026 08:33
@aprojic
aprojic merged commit 11b4d6e into main Oct 11, 2026
2 checks passed
@aprojic
aprojic deleted the lab-03-compose branch October 11, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant