Part 9 of 10 of Building Instagram's Authentication Backend . If you're just joining, the repo is here and you can catch the earlier parts on the YouTube playlist . Eight parts of code, zero runs By the end of part 8, every layer of this backend existed: DTOs, exceptions, entities, repositories, five services, a security filter chain and a controller. And I had never started the application. Not once. Everything so far was code I'd reasoned through and believed would work. This part is where that belief gets tested. We containerize the app, put Postgres, Redis and a fake mail server next to it, and bring all four up with one command. It did not work the first time, so this post is the real debugging session, with each bug, its symptom and its fix. If you're containerizing your own Spring Boot app, there's a good chance you'll hit at least one of these. In this post: A multi-stage Dockerfile for Spring Boot, line by line A docker-compose.yml ...
Part 10 of 10 — the finale of Building Instagram's Authentication Backend . If you're just joining, the repo is here and the whole series is on the YouTube playlist . Booting isn't the same as working Last part, the app booted. Four containers, all healthy, Flyway running our migration against a real database for the first time. It felt like a finish line. It wasn't. A server that starts has only proved the wiring is intact. It hasn't proved that a user can register, that the email arrives, that a locked account stays locked, or that a stolen token gets caught. So for this last part I wrote no new code. I used the thing the way a real client would, then tried to break it on purpose. This post is the written version of that video, with every piece of code the demo touches next to the request that triggers it. You can follow along with nothing but curl , jq and the Docker Compose stack from part 9 . In this post: Register, read the OTP in MailHog,...