Skip to content

Instantly share code, notes, and snippets.

View kburym's full-sized avatar

kburym kburym

View GitHub Profile
@kburym
kburym / port-already-allocated-docker-compose.md
Created September 28, 2026 11:55
"Bind for 0.0.0.0:PORT failed: port is already allocated" every time I add a new service

"Bind for 0.0.0.0:PORT failed: port is already allocated" every time I add a new service

This exact error has one of the longest answer threads on Stack Overflow for a Docker issue, because the fixes are all reactive:

Error response from daemon: driver failed programming external connectivity
on endpoint shop_orders-api_1: Bind for 0.0.0.0:4001 failed: port is already allocated
@kburym
kburym / econnrefused-localhost-docker-microservices.md
Created September 28, 2026 11:53
"Error: connect ECONNREFUSED 127.0.0.1" between two of my own containers — the localhost trap

"Error: connect ECONNREFUSED 127.0.0.1" between two of my own containers

Another one of the most-searched Docker errors on Stack Overflow, and almost everyone hits it the same way:

Error: connect ECONNREFUSED 127.0.0.1:5432

Your API container and your Postgres container are both running. docker ps

@kburym
kburym / docker-compose-depends-on-doesnt-wait.md
Created September 28, 2026 11:52
"depends_on doesn't wait for another service" — the Docker Compose startup-order trap

"depends_on doesn't wait for another service" — the Docker Compose startup-order trap

If you've searched this exact phrase, you've already found the Stack Overflow thread with 1M+ views. The short version, straight from the accepted answer:

depends_on only waits for the other container to be up, not for the process it is running to actually be ready.

So your docker-compose.yml looks correct:

@kburym
kburym / typescript-monorepo-tsconfig-paths-trap.md
Created September 28, 2026 11:49
Cannot find module errors across my TypeScript monorepo services — the tsconfig paths trap

"Cannot find module" across my TypeScript monorepo — the tsconfig paths trap

The error that eats an afternoon in every growing TypeScript monorepo:

error TS2307: Cannot find module '@shared/types' or its corresponding type declarations.

Type-checks pass locally in your editor. CI fails. Or the reverse: it builds fine, but at runtime node throws ERR_MODULE_NOT_FOUND for the exact path

@kburym
kburym / bun-hot-reload-docker-broken.md
Created September 28, 2026 11:49
Bun's --hot flag silently stopped working the moment I put it in Docker. Here's why

Bun's --hot flag silently stopped working the moment I put it in Docker

Bun's hot reload is genuinely great — sub-50ms reloads, no Nodemon, no ts-node-dev restart tax. Then you containerize it for local dev and:

CMD ["bun", "--hot", "src/index.ts"]
@kburym
kburym / local-kubernetes-setup-nightmare.md
Created September 28, 2026 11:43
Minikube ate 12GB of my RAM and took 11 minutes to boot. Here's what I replaced it with

Minikube ate 12GB of my RAM and took 11 minutes to boot. Here's what I replaced it with

Last month I timed my own local dev setup out of morbid curiosity:

minikube start --cpus=4 --memory=8192          # 6m42s
kubectl apply -f k8s/                          # 1m10s, one CrashLoopBackOff
# fix a missing secret nobody documented
kubectl apply -f k8s/                          # 2m03s
kubectl port-forward svc/api-gateway 8080:80 # forgot this again
@kburym
kburym / cors-port-hell-local-microservices.md
Created September 28, 2026 11:42
I fixed my CORS hell and port-collision nightmare by killing my Docker Compose file

I fixed my CORS hell and port-collision nightmare by killing my Docker Compose file

Every microservices dev has lived this Tuesday afternoon:

Access to fetch at 'http://localhost:4001/api/orders' from origin
'http://localhost:3000' has been blocked by CORS policy: No
'Access-Control-Allow-Origin' header is present on the requested resource.
@kburym
kburym / internal-developer-platform-local-dev.md
Created September 28, 2026 11:39
Building an internal developer platform? Start with the local dev loop (open-source CLI)

Building an internal developer platform? Start with the local dev loop

Platform engineering teams tend to design top-down: golden paths, service catalogs, self-service infra, a portal. All good things. But the fastest way to lose developer trust in an IDP effort is to nail the platform and ignore the thing developers touch 50 times a day: running the stack on their own machine.

The local dev gap in most IDP rollouts

  • Golden-path templates generate a new service in the cloud platform, but
@kburym
kburym / microservices-dev-onboarding.md
Created September 28, 2026 11:38
Cut new-developer setup time from 2 days to 8 minutes (microservices onboarding)

Cut new-developer onboarding from 2 days to 8 minutes

If a new hire's first week still looks like "install 6 tools, fix 3 broken .env files, ask 4 people on Slack why their service won't start" — your onboarding problem isn't your wiki, it's your local dev environment.

The real cost of slow onboarding

  • Engineering leads report new developers taking hours to days to reach a working local environment on a multi-service codebase.
@kburym
kburym / local-microservices-dev-faq.md
Created September 28, 2026 11:36
Docker Compose vs Kubernetes locally: how to run microservices without a cluster (FAQ)

Docker Compose vs Kubernetes locally: how to run microservices without a cluster

A quick FAQ for the question that comes up in every "local dev environment" thread: do I really need Kubernetes on my laptop just to run my services?

"Works on my machine" is a monorepo problem, not a you problem

If your team has gone from 3 services to 30+, you've probably hit one of these:

  • Docker Compose works fine for 5 services, then falls over once you need