Practical lab guide
Lab: run a Compose fixture and inspect MicroBank readiness
Practice local lifecycle steps, then document the real application gaps.
On this page
Run one small local profile
Use OrbStack's Docker engine and the Dockerfile/status.json fixture from the image bite. Confirm port 8765 is unused. Save compose.yaml beside the Dockerfile:
services:
status:
build: .
image: learnwithsk-status:dev
ports:
- '127.0.0.1:8765:8000'
healthcheck:
test: ['CMD', 'python', '-c', "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/status.json', timeout=2)"]
interval: 5s
timeout: 3s
retries: 3
Run docker compose -p sk-study config --quiet, then docker compose -p sk-study up -d --build. Inspect docker compose -p sk-study ps and logs --tail=30. Request the status file from the Mac with a bounded curl command. Compare the health-check result with the actual response body; the simple check tests HTTP reachability, not JSON semantics.
Stop the project with docker compose -p sk-study down. Repeat the request to confirm the listener is gone. This project defines no persistent volumes. Remove its local image when no remaining exercise needs it.
Follow the observation from each location
From the Mac, use curl --fail --max-time 3 http://127.0.0.1:8765/status.json. Expect the JSON fixture from the image you built. The container's health check uses 127.0.0.1:8000 from inside that container, while the Mac reaches the host's published 8765. Those addresses differ because the callers differ.
If Compose reports running but not healthy, inspect the health command and its output before changing it. If health passes but the JSON is wrong, inspect which image and source file were built. If shutdown completes but the host request still succeeds, check for a different listener or another project on that port.
The health command requires only a successful HTTP response; it does not validate status=ok. Change the body in a rebuilt fixture once to demonstrate that distinction, then restore ok. Record it as a controlled fixture experiment, not a MicroBank failure.
Inspect MicroBank before claiming a working deployment
Prerequisites: the AWS identity/resource bites, LocalStack dependency bite, and the Docker/Compose exercises above. Finish those before attempting an application startup.
Use the reviewed MicroBank commit↗. Read docker-compose.yml, the three application Dockerfiles, infra/localstack/init.sh, frontend environment access, and API startup/health code. Run docker compose config --services and config --quiet in that checkout; validation is not startup verification.
Document these source observations:
- Compose contains frontend, Accounts, Ledger, three PostgreSQL services, and LocalStack; it lacks a notifications application service.
- Frontend Auth0 settings and API base URL are read through Vite environment variables. Check build-time injection and real callback configuration before expecting login to work.
- Ledger's Dockerfile skips tests during packaging; Accounts' static health response is not an end-to-end transaction check.
- Database persistence, readiness ordering, local host port bindings, and image/runtime compatibility need a deliberate local profile.
Resolve these prerequisites with your own configuration and keep the existing authentication flow intact. Build a dedicated local profile in the application project before claiming a successful MicroBank user journey. Keep simulated-user runs local and bounded; do not point them at EKS/GKE.
Checkpoint and revision
Submit fixture startup/response/cleanup evidence plus a MicroBank dependency table and concrete missing-work list. Label application steps not executed. On the 16 GB host, stop other deployment tracks before attempting the full stack and measure actual usage.
Revision: a running fixture teaches lifecycle; a repository inspection identifies prerequisites; only an executed user operation proves that operation works.
Apply this to MicroBank
After the six foundations modules, begin the seven-step MicroBank implementation. Complete the project setup before building the local profile; later stages use the files you create there.
Sources and practice status
Primary references: Compose health behavior↗; Compose down↗; Vite environment variables↗.
Reviewed against documentation on 1 October 2026. The exercises still need to be run in your environment. Record your results and tool versions in your notes.
Your notes and evidence
Record observations, questions, or links to your work. Keep credentials out of your notes.
Back up or restore this path
Progress and notes stay in this browser. A backup contains only this learning path.