8000 feat(nix/docker/aio/ssl): support for adhoc certs by sinanmohd · Pull Request #10666 · nocodb/nocodb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(nix/docker/aio/ssl): support for adhoc certs #10666

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

Merged
merged 1 commit into from
Feb 28, 2025
Merged

Conversation

sinanmohd
Copy link
Member

Change Summary

Provide summary of changes with issue number if any.

Change type

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

Test/ Verification

Provide summary of changes.

Additional information / screenshots (optional)

Anything for maintainers to be made aware of

Copy link
Contributor
coderabbitai bot commented Feb 28, 2025
📝 Walkthrough

Walkthrough

The change introduces a new conditional branch in the shell_up.sh script. The script now checks for the existence of the file /var/lib/acme/"$aio_ssl_domain"/adhoc. If this file exists, it outputs "Certificate managed by user" and exits with a status code of 0, bypassing the subsequent certificate management logic that checks for the existence of a certificate file.

Changes

File Change Summary
nix/docker/.../acme-srv/shell_up.sh Added a conditional block that checks for /var/lib/acme/"$aio_ssl_domain"/adhoc. If present, the script outputs a message and exits early.

Sequence Diagram(s)

sequenceDiagram
    participant Script
    participant FS as File System
    participant CertCheck as Certificate Management

    Script->>FS: Check for /var/lib/acme/"$aio_ssl_domain"/adhoc file
    alt File exists
        FS-->>Script: File found
        Script->>Script: Output "Certificate managed by user"
        Script-->>Script: Exit with status 0
    else File not found
        FS-->>Script: No file found
        Script->>FS: Check for certificates/"$aio_ssl_domain".crt file
        FS-->>Script: Return certificate file status
        Script->>CertCheck: Continue with certificate management logic
    end
Loading
✨ Finishing Touches
  • 📝 Generate Docstrings

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
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: 0

🧹 Nitpick comments (1)
nix/docker/all_in_one/init/s6-services/services/acme-srv/shell_up.sh (1)

57-61: Ad-hoc Certificate Management Block Addition
The new conditional block correctly checks for the existence of the adhoc file and exits early, which aligns with the PR objective to support user-managed certificates. This early exit prevents the script from performing unnecessary certificate processing when an adhoc certificate is in place.

Suggestion: For enhanced robustness against unexpected whitespace or special characters in the domain variable, consider wrapping the entire file path in quotes. For example:

-if [ -f /var/lib/acme/"$aio_ssl_domain"/adhoc ]; then
+if [ -f "/var/lib/acme/$aio_ssl_domain/adhoc" ]; then

This small change improves the safety and readability of the file check.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1bb8456 and 8bc90f5.

📒 Files selected for processing (1)
  • nix/docker/all_in_one/init/s6-services/services/acme-srv/shell_up.sh (1 hunks)

@pranavxc pranavxc merged commit 4404c16 into develop Feb 28, 2025
1 check passed
@pranavxc pranavxc deleted the aio-ssl-adhoc branch February 28, 2025 05:55
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.

2 participants
0