{
  "id": 9227635,
  "title": "Building FoxyInvoice — Chapter 7: CI/CD — push to main and it's live",
  "url": "https://urgent.news/2026/09/23/building-foxyinvoice-chapter-7-ci-cd-push-to-main-and-its-live",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-23T00:08:25.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/seolith/building-foxyinvoice-chapter-7-cicd-push-to-main-and-its-live-3pnj"
  },
  "original_language": "en",
  "account": "Deploying FoxyInvoice: CI/CD Pipeline and Real-Life Incidents\n\nThis chapter covers the end-to-end deploy pipeline for FoxyInvoice, including three incidents where the pipeline failed. The system has no staging environment; instead, main is production, and the gates ensure safe push-to-deploy.\n\nThe deploy pipeline runs gates first, in parallel. Unit tests, integration tests with Testcontainers, and conformance checks run simultaneously. A concurrency group serializes deploys, ensuring pushes minutes apart never interfere. SSH deploys the code, git reset --hard on the host, and BuildKit secrets are mounted during the build.\n\nHealth gates, SPA rebuild, and smoke tests follow. Each API container must report healthy before proceeding, or the pipeline fails loudly. Database migrations apply automatically on container startup. The SPA rebuilds on the host, and both health endpoints must return 200. Finally, IndexNow is pinged.\n\nThree incidents highlight the pipeline's flaws:\n1. A build failure caused unexpected success for eight hours.\n2. A cancelled deploy run locked out the concurrency group, causing queueing issues.\n3. A YAML label mismatch created jobs that queued indefinitely.\n\nThe pipeline's lessons include aborting failed builds, recognizing distinct failure modes, and the importance of precise label specifications. The doctrine of \"forward-fix\" prevents rollbacks, as migrations are irreversible. Push-to-deploy has psychological benefits for solo developers, encouraging frequent shipping and immediate feedback.",
  "summary": "This series is written in the open, from a real production system. This chapter is the deploy pipeline end to end, plus three real incidents where it quietly lied to us. [All chapters and diagrams live in the public repo.] There is no staging environment in this system. There is main , and main is production. That sounds reckless until you see the gates — and the alternative for a solo operator…",
  "key_points": [
    "CI/CD pipeline runs gates in parallel for FoxyInvoice deployment",
    "Health gates, SPA rebuild, and smoke tests follow API container checks",
    "Three incidents reveal pipeline flaws: build failures, queueing issues, and YAML label mismatches"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 2,
    "also_reported_by": [
      {
        "outlet": "Dev.to",
        "title": "Building FoxyInvoice — Chapter 8: Unit economics — what it actually costs",
        "url": "https://urgent.news/2026/09/23/building-foxyinvoice-chapter-8-unit-economics-what-it-actually-costs",
        "published": "2026-09-23T00:27:12.000Z"
      }
    ]
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}