// HOW IT WORKS
The Deployment Pipeline
Every deployment follows the same 5-step pipeline. The key insight: your production container stays live until the very last moment, and only after a successful health check.
1. Fetch
Trangly receives the GitHub webhook and clones the repository with depth=1 for speed.
2. Build
Runs docker compose build (Rebuild Mode) or pulls the pre-built image (Hot-Swap Mode).
3. Health Check
Starts the new container and repeatedly hits your configured health endpoint until it returns HTTP 200. If it fails after retries, the deployment is aborted — your old container keeps running.
4. Swap
This is the only step that touches production. Traffic is redirected to the new container. The swap takes milliseconds.
5. Cleanup
The old container is stopped and removed. Dangling images are pruned to free disk space.