Skip to content

Feature/ssl update wizard#33

Merged
iam-joey merged 5 commits into
mainfrom
feature/ssl-update-wizard
Apr 6, 2026
Merged

Feature/ssl update wizard#33
iam-joey merged 5 commits into
mainfrom
feature/ssl-update-wizard

Conversation

@iam-joey
Copy link
Copy Markdown
Contributor

@iam-joey iam-joey commented Apr 1, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: da841d80-88a9-4cd3-8704-0c3facc7ebd5

📥 Commits

Reviewing files that changed from the base of the PR and between 6d09c95 and ca36b64.

📒 Files selected for processing (1)
  • setup_payram.sh

Summary by CodeRabbit

  • New Features

    • Readline-style editing for all interactive prompts.
    • SSL Update Wizard: manage Let's Encrypt, custom certs, or remove SSL; automated renewal/validation flows.
    • New firewall/access notice with copyable guidance for opening ports and SSL context.
  • Improvements

    • Quieter installer/updater output for cleaner UX.
    • Container reconfiguration preserves existing data and volumes.
    • Reduced post-deploy container log noise.

Walkthrough

The installer switches prompts to readline-style input, adds a full SSL update/remove wizard (Let’s Encrypt and custom certs), functions to clean certbot artifacts, update config, and non-destructively recreate the container, and reduces noisy container/updater logging and displayed security text.

Changes

Cohort / File(s) Summary
Installer + SSL & Container
setup_payram.sh
Replaced read -p with read -e -p across prompts. Added SSL management: cleanup_letsencrypt_cert(), get_current_ssl_domain(), update_ssl_in_config(), configure_ssl_update_*() and configure_ssl_update(). Added reconfigure_container() and display_firewall_notice(). Removed post-start container info logs and the previous security note in display_access_urls().

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Script as setup_payram.sh
    participant Certbot as certbot
    participant Config as Config File
    participant Docker as Docker Engine
    participant Container as payram Container

    User->>Script: Choose "Update SSL Configuration"
    Script->>Script: Determine current SSL mode/domain
    alt Let’s Encrypt flow
        Script->>Certbot: Check/install certbot
        Script->>Certbot: Validate or obtain certificate (may stop container for port 80)
        Certbot-->>Script: Cert validated/issued
    else Custom or Remove flow
        Script->>Script: Validate provided cert or remove cert config
    end
    Script->>Config: update_ssl_in_config(new_path, new_mode)
    Config-->>Script: Config saved
    Script->>Docker: Stop and remove payram container (preserve volumes)
    Docker-->>Script: Container removed
    Script->>Docker: Recreate/run container with updated env/config
    Docker->>Container: New container running
    Container-->>Script: Ready
    Script->>User: SSL update complete
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐰 I nudged the prompts to dance with ease,

readlines hum where once was freeze.
Certbot and I hopped through port and key,
Volumes safe — the container’s free.
A carrot-cheer for SSL harmony.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a meaningful pull request description explaining the purpose, key changes, and any breaking changes or migration steps required.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main feature being added—an SSL update wizard with new configuration and management capabilities.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/ssl-update-wizard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
setup_payram.sh (1)

3137-3151: Consider: Box formatting may misalign with variable-length content.

The embedded variables ($ip_display, $ssl_context, $db_context) will cause the ASCII box to have inconsistent line widths. This is a minor cosmetic issue - the information is still conveyed correctly.

If consistent box formatting is desired, consider using printf with fixed-width formatting or simply using unboxed bullet points for the variable content.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@setup_payram.sh` around lines 3137 - 3151, The ASCII box in setup_payram.sh
uses print_color lines with embedded variables ($ip_display, $ssl_context,
$db_context, $port_short) which can break alignment; update the block that
prints the box (the series of print_color calls) to compute a consistent width
and format variable content using fixed-width printf formatting (or switch to
unboxed bullet lines) before passing to print_color so long values don't
misalign the box; specifically modify the print sequence that prints the
header/footer and the lines containing $ip_display, $ssl_context, $db_context,
and $port_short to use a single formatter that pads/truncates to the chosen
width or replace those lines with simple bullet prints instead.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@setup_payram.sh`:
- Around line 3724-3725: The variable install_mode is assigned multiple times
(e.g., the assignment shown in the snippet and declarations around the menu
logic) but never used; remove all unused install_mode assignments and its
initial declaration (search for install_mode) and also remove any related dead
branches/comments in the menu handling that reference it, or alternatively if
intended to control behavior, replace the redundant assignments with a single
canonical assignment and add the conditional checks that actually use
install_mode in the relevant handlers (e.g., the menu selection logic and
installer functions) so the variable is either used consistently or eliminated
entirely.
- Around line 3091-3098: The variable port_list is assigned in the SSL branch
and the non-SSL branch but never used; remove the port_list assignments and keep
only port_short assignments (the code blocks that set port_list="443 and
8443"/"80 and 8080" should be deleted), and verify no other code references
port_list (leave port_short as-is since that is used later).

---

Nitpick comments:
In `@setup_payram.sh`:
- Around line 3137-3151: The ASCII box in setup_payram.sh uses print_color lines
with embedded variables ($ip_display, $ssl_context, $db_context, $port_short)
which can break alignment; update the block that prints the box (the series of
print_color calls) to compute a consistent width and format variable content
using fixed-width printf formatting (or switch to unboxed bullet lines) before
passing to print_color so long values don't misalign the box; specifically
modify the print sequence that prints the header/footer and the lines containing
$ip_display, $ssl_context, $db_context, and $port_short to use a single
formatter that pads/truncates to the chosen width or replace those lines with
simple bullet prints instead.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 19bccc51-1883-4166-ae77-1da856a81a13

📥 Commits

Reviewing files that changed from the base of the PR and between e4310c8 and 6d09c95.

📒 Files selected for processing (1)
  • setup_payram.sh

Comment thread setup_payram.sh
Comment thread setup_payram.sh Outdated
@iam-joey iam-joey merged commit 77b035e into main Apr 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants