Skip to content

Conversation

@xfalcox
Copy link
Member

@xfalcox xfalcox commented Jan 5, 2026

Summary

One-line Discourse installation:

wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/main/install-discourse | sudo bash

This handles Docker installation, clones the repo, and launches an interactive setup wizard with a modern terminal UI.

What's New

  • One-line installer (install-discourse) - installs Docker, sets up the repo, runs the wizard
  • Ruby-based setup wizard - replaces the bash discourse-setup script with a cleaner implementation
  • Modern terminal UI - uses Gum for styled prompts, spinners, and progress indicators
  • Pre-built Docker image - wizard runs in discourse/setup-wizard:release (multi-arch: amd64/arm64)

Usage

# One-line install (recommended for new servers)
wget -qO- https://raw.githubusercontent.com/discourse/discourse_docker/main/install-discourse | sudo bash

# Or run the wizard directly if you already have the repo
sudo ./discourse-setup-ruby [--skip-rebuild] [--skip-connection-test] [--debug]

Test plan

  • One-line install on fresh server
  • Fresh install (no existing containers/app.yml)
  • Reconfiguration (existing app.yml)
  • Test with --skip-rebuild flag
  • Verify image works on amd64 and arm64

🤖 Generated with Claude Code

xfalcox and others added 5 commits January 5, 2026 16:15
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]>
xfalcox and others added 6 commits January 9, 2026 13:43
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]>
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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants