feat: Stopping and restart of same container#61
Merged
Conversation
5791548 to
3b8271f
Compare
There was a problem hiding this comment.
Pull request overview
Adds stop support and improves container restart/stop handling across the health dashboard UI and backend health API, aligning host-side operations with the existing /hostpipe/pipe shell-script execution pattern.
Changes:
- Frontend: show stop counts and add a Stop action alongside Restart.
- Backend: add stop tracking (
stopCounts) and a/health/:subdomain/stopendpoint; route stop through new host shell scripts. - Infrastructure: centralize CORS handling via
oakCorsmiddleware (removing per-handlerAccess-Control-Allow-Originheaders).
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/src/components/ContainerHealth.vue | Adds Stop button and stopCount display; adjusts restart/stop calls to use a fallback identifier. |
| src/backend/utils/auto-restart.ts | Adds stop counting and routes restart/stop through host-executed shell scripts. |
| src/backend/health-api.ts | Exposes stopCount in health payload and adds stopContainerHandler. |
| src/backend/server.ts | Registers stop route and switches to configured CORS middleware. |
| src/backend/main.ts | Removes per-handler CORS headers (now handled globally). |
| src/backend/auth/github.ts | Removes per-handler CORS headers (now handled globally). |
| src/backend/tests/container-health.test.ts | Adds tests intended to cover stop count and restart/stop behaviors. |
| src/backend/shell_scripts/stop.sh | New host script to stop container and disable nginx routing. |
| src/backend/shell_scripts/restart.sh | New host script to restart container and re-enable nginx routing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
baa7265 to
f4bba32
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.