Skip to content

feat: Stopping and restart of same container#61

Merged
opbot-xd merged 5 commits intodevelopfrom
jatin/fix_container_restart
Apr 8, 2026
Merged

feat: Stopping and restart of same container#61
opbot-xd merged 5 commits intodevelopfrom
jatin/fix_container_restart

Conversation

@Annonnymmousss
Copy link
Copy Markdown

@Annonnymmousss Annonnymmousss commented Mar 19, 2026

image

@Annonnymmousss Annonnymmousss force-pushed the jatin/fix_container_restart branch 2 times, most recently from 5791548 to 3b8271f Compare March 19, 2026 20:53
@Annonnymmousss Annonnymmousss requested a review from opbot-xd March 21, 2026 04:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/stop endpoint; route stop through new host shell scripts.
  • Infrastructure: centralize CORS handling via oakCors middleware (removing per-handler Access-Control-Allow-Origin headers).

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.

Comment thread src/frontend/src/components/ContainerHealth.vue Outdated
Comment thread src/frontend/src/components/ContainerHealth.vue
Comment thread src/frontend/src/components/ContainerHealth.vue
Comment thread src/backend/utils/auto-restart.ts Outdated
Comment thread src/backend/utils/auto-restart.ts Outdated
Comment thread src/backend/tests/container-health.test.ts Outdated
Comment thread src/backend/tests/container-health.test.ts
Comment thread src/backend/tests/container-health.test.ts
Comment thread src/backend/shell_scripts/stop.sh Outdated
Comment thread src/backend/shell_scripts/restart.sh Outdated
@Annonnymmousss Annonnymmousss changed the title fix: container restart feat: Stopping and restart of same container Apr 8, 2026
@Annonnymmousss Annonnymmousss force-pushed the jatin/fix_container_restart branch from baa7265 to f4bba32 Compare April 8, 2026 11:01
@opbot-xd opbot-xd merged commit 84502cf into develop Apr 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants