Skip to content

feat(scripts): support detached dev startup#21

Merged
astromen-orbiter merged 1 commit intomainfrom
codex/run-start_dev.sh-in-background
Mar 3, 2026
Merged

feat(scripts): support detached dev startup#21
astromen-orbiter merged 1 commit intomainfrom
codex/run-start_dev.sh-in-background

Conversation

@AstroMen
Copy link
Copy Markdown
Owner

@AstroMen AstroMen commented Mar 3, 2026

Motivation

  • Starting the dev stack currently blocks the invoking shell, preventing use of the same terminal for other commands.
  • Provide a safe background mode that preserves logs and PIDs so developers can start services from a single terminal and continue working.

Description

  • Add CLI parsing to scripts/start_dev.sh for -d/--detach and -h/--help and introduce DETACH_MODE to control background behavior.
  • Introduce configurable log and PID file variables (API_LOG_FILE, WEB_LOG_FILE, API_PID_FILE, WEB_PID_FILE) and redirect service output into those logs.
  • Only install the trap cleanup handler in foreground mode, and in detach mode disown the child processes and write their PIDs to the PID files.
  • Print follow-up commands for tailing logs and stopping background services while preserving the original foreground blocking behavior when no flag is provided.

Testing

  • Ran a syntax check with bash -n scripts/start_dev.sh, which succeeded.
  • Ran ./scripts/start_dev.sh --help to verify usage output, which succeeded and printed the help text.

Codex Task

@astromen-orbiter astromen-orbiter merged commit eda3232 into main Mar 3, 2026
2 checks passed
@astromen-orbiter astromen-orbiter deleted the codex/run-start_dev.sh-in-background branch March 3, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants