Skip to content

[INSTALLER] Offer optional “Build now” step (auto-build) #1950

@AlexSkrypnyk

Description

@AlexSkrypnyk

Summary

Add an opt-in step at the end of the installer to run the full site build via CLI.
Goal: reduce manual steps for first-time users while keeping the default non-blocking.

User Experience

  • After finishing prompts, ask: “Run the site setup now?”
    • Subtitle: Takes ~5–10 min; output will be streamed. You can skip and run later.
    • Buttons: Run now / Skip (default focus on Skip)

Preflight (must pass or we skip with guidance)

  • Check: Docker, Docker Compose, Ahoy, Pygmy (running)
  • If any missing/not running:
    • Show short error listing missing pieces
    • Print manual commands to run later (e.g. ahoy fetch-db && ahoy build)
    • Exit the auto-build path gracefully

Execution (if user chooses “Run now”)

  • Stream all output to console and write to logs/installer-build.log
  • Based on chosen Starting point:
    • Drupal (profile) → perform one-time profile install, then ahoy build
    • Drupal from demo databaseahoy fetch-db, then ahoy build
  • Ensure long-running process has no timeout (CLI PHP; disable Symfony Process timeouts)

On Success (concise summary)

  • Site URL (local dev URL)
  • One-time login link
  • Commits created:
    • chore(init): first commit after install
    • chore(config): export configuration
  • .env cleanup: remove/adjust demo/bootstrap vars as needed
  • Next steps:
    • If profile path: remind to export DB and proceed with hosting/provisioning docs
    • If demo DB: continue normal workflow; CI DB caching applies

On Failure (actionable)

  • Show where it stopped (phase/command)
  • Print the exact retry command (e.g. ahoy build)
  • Point to logs/installer-build.log
  • Link to troubleshooting docs

CLI / Non-interactive

  • New flag: --build (run auto-build without prompt)
    • Alternatives considered: --with-build, --auto-build, --setup, --provision
  • Respect existing --quiet / --verbose
  • In CI: always skip auto-build (print note)

Acceptance Criteria

  • Prompt appears only at the end; default is Skip
  • Preflight detects tools reliably and fails fast with clear guidance
  • Output is streamed and saved to a log file
  • Success and failure summaries are concise and actionable
  • Works for both selected starting points (profile/demo DB)
  • No silent mutation of provisioning modes beyond documented .env cleanup

Technical Notes (implementation guidance)

  • Use Symfony Process with:
    • setTimeout(null); optional setIdleTimeout if needed
    • Capture STDOUT and STDERR (Docker/Compose often use STDERR)
    • Avoid TTY to preserve streaming capture
  • Ensure CLI PHP (set_time_limit(0) defensively)

Metadata

Metadata

Assignees

Labels

ConfirmedThe issue was triaged and confirmed for development

Projects

Status

In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions