-
Notifications
You must be signed in to change notification settings - Fork 806
FEATURE: Add Ruby-based setup wizard using Gum #1018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduces a new interactive setup wizard written in Ruby that provides a modern terminal UI experience using the Gum and Glamour gems. Key features: - Runs in a lightweight Docker container (no Ruby needed on host) - Uses docker-api gem to communicate with Docker socket directly - Interactive prompts with styled input fields and confirmations - Catppuccin-inspired color scheme with ASCII banner - Progress indicators and spinners for system checks - Full feature parity with bash discourse-setup for standalone installs Usage: ./discourse-setup-ruby [--skip-rebuild] [--skip-connection-test] The wrapper script builds the wizard image and handles the rebuild on the host after configuration completes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace regex-based YAML parsing with proper YAML library - Add yq binary for clean YAML output formatting - Simplify Let's Encrypt: always enabled, ask only about email notifications - Simplify SMTP and MaxMind prompts: Yes/No with default No - Fix Ctrl+C handling for all input and confirm prompts - Work around gum-ruby gem bug that ignores `default: false` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
When user skips SMTP configuration, remove the placeholder SMTP variables from the generated config instead of keeping them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add setup_wizard job to build.yml workflow for multi-arch builds - Add setup_wizard_amd64/arm64 to auto_build.rb - Push discourse/setup-wizard:release to Docker Hub - Update discourse-setup-ruby to pull image instead of building locally - Fix Dockerfile to use TARGETARCH for yq download (multi-arch support) - Hide subdomain service feature for now (focus on core rewrite first) Co-Authored-By: Claude Opus 4.5 <[email protected]>
When running via one-liner (`wget ... | sudo bash`), stdin is the pipe not the terminal. Fix by explicitly redirecting from /dev/tty which is still the user's terminal. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Network checks using nc/curl are unreliable from inside a Docker container. Skip for now with a TODO to move checks to the host. Co-Authored-By: Claude Opus 4.5 <[email protected]>
This reverts commit b70cbc4.
Run with --debug flag to see detailed output: - netcat path - Port in-use check - DNS resolution - Listener status - Curl command and response Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace echo -e with printf for shell portability (echo -e doesn't interpret escape sequences in dash, which is /bin/sh on Debian) - Use \r\n for proper HTTP line endings - Remove -p flag from nc (netcat-openbsd on Debian doesn't use -p with -l) - Capture netcat stderr to temp log file for debugging listener failures Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Remove unused packages: git, procps, coreutils - Combine apt-get, yq download, and cleanup into single RUN layer - Combine bundle config and install into single RUN layer Reduces layer count and image size. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Address PR review feedback: - Swap creation now runs on host via signal file pattern (exit 42) since swapon/sysctl require host privileges - Disk space check now uses mounted base_dir instead of container's /var Co-Authored-By: Claude Opus 4.5 <[email protected]>
pmusaraj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. While we still work on this, should we move the install-discourse and discourse-setup-ruby files to a folder that indicates they're the next gen of the scripts (named next or experimental or dev)?
| | |) | (_-</ _/ _ \ || | '_(_-</ -_) | ||
| |___/|_/__/\__\___/\_,_|_| /__/\___| | ||
| Setup Wizard | ||
| BANNER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
| @scaling_params = {} | ||
| scaler.apply_scaling(@scaling_params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? It looks like the passed params are empty.
Summary
One-line Discourse installation:
wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/main/install-discourse | sudo bashThis handles Docker installation, clones the repo, and launches an interactive setup wizard with a modern terminal UI.
What's New
install-discourse) - installs Docker, sets up the repo, runs the wizarddiscourse-setupscript with a cleaner implementationdiscourse/setup-wizard:release(multi-arch: amd64/arm64)Usage
Test plan
containers/app.yml)app.yml)--skip-rebuildflag🤖 Generated with Claude Code