← All work

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.

12:03 → 3:15
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

  1. Fetch source
  2. npm run build (outside Docker, output never used)
  3. docker build → npm run build
  4. lint inside the production build
  5. 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

WhatBeforeAfterChange
Deploy pipeline12 min 3 s3 min 15 s−73%
Local Docker build~3 min93 sno lint
↑↓ move↵ openesc close