mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #5494] [MERGED] fix: ensure graceful shutdown and container stop when stopApp is called #5237
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5237
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5494
Author: @mirarifhasan
Created: 10/18/2025
Status: ✅ Merged
Merged: 10/21/2025
Merged by: @mirarifhasan
Base:
next← Head:fix/graceful-shutdown-on-app-stop📝 Commits (2)
a19b6c9fix: graceful shutdown handling for backend app5a54c13chore: add startup delay to health check script📊 Changes
4 files changed (+17 additions, -5 deletions)
View changed files
📝
healthcheck.sh(+8 -0)📝
packages/hoppscotch-backend/src/infra-config/helper.ts(+5 -3)📝
packages/hoppscotch-backend/src/main.ts(+3 -1)📝
prod.Dockerfile(+1 -1)📄 Description
Closes BE-666
What's changed
This pull request improves the application's shutdown process by ensuring a graceful shutdown when stopping the app, particularly in Docker environments. The changes enhance logging for better observability and update the shutdown mechanism to properly trigger NestJS lifecycle hooks.
Graceful shutdown improvements:
stopAppfunction inhelper.tsto send a SIGTERM signal to the process, triggering NestJS's graceful shutdown and ensuring lifecycle hooks are called. Also improved logging to clarify the shutdown process.main.tsto provide more informative logs during shutdown, confirm successful application closure, and explicitly exit the process after shutdown is complete.Notes to reviewers
You can modify any infrastructure configurations from the admin dashboard.
Please note that the backend Docker container will automatically restart and become available to serve API requests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.