The build that ran twice · Jun 2025
The build that ran twice
Every deploy of the merchant dashboard took twelve minutes. The same build took three on my laptop. The difference was not the machine.
- Role
- Frontend engineer
- When
- Jun 2025
- Where
- PayGlocal
- Stack
- AWS CodeBuildDockerNext.js
The situation
Slow deploys made every hotfix slower and discouraged small, frequent releases.
What I built
- Read the pipeline end to end and found the app was built outside Docker and again inside it; the first build was never used.
- Removed the redundant build and skipped lint in production builds only (lint already runs on every push).
- Documented the remaining gap (laptop vs 4 vCPU build machine) and the cost trade-off of bigger machines.
Try it
12:03
Deploy time, before
- Fetch source
- npm run build (outside Docker, output never used)
- docker build → npm run build
- lint inside the production build
- Push image and deploy
Stage widths are illustrative; the start and end totals are the measured pipeline times. Lint still runs on every push, and stays on in dev and UAT builds.
Decisions
Keep the safety net where it matters
Lint stays on for development and UAT builds. Only the production build skips it, because the same code already passed lint on push.
Outcome
| What | Before | After | Change |
|---|---|---|---|
| Deploy pipeline | 12 min 3 s | 3 min 15 s | −73% |
| Local Docker build | ~3 min | 93 s | no lint |
Next projectDesign system →Data table, filter chips, pickers and elevation tokens for a public React design system; about twenty releases.