-
Notifications
You must be signed in to change notification settings - Fork 804
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
Draft
xfalcox
wants to merge
11
commits into
main
Choose a base branch
from
ruby-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+1,774
−1
Conversation
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
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]>
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.
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