Skip to content
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

Update Nginx Proxy Manager to v2.12.1 #612

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mislav
Copy link

@mislav mislav commented Dec 14, 2024

Chained PR on top of #611

Updating the patches was quite a pain 😞

Summary by CodeRabbit

  • New Features

    • Updated Nginx Proxy Manager to a newer version.
    • Changed logging configuration to redirect logs to Docker's standard output.
  • Bug Fixes

    • Corrected file path references from /data to /config across various components.
  • Documentation

    • Updated dependency versions in package files for improved compatibility.
  • Chores

    • Streamlined the installation process for Python packages by simplifying commands.

Copy link

coderabbitai bot commented Dec 14, 2024

Walkthrough

This pull request introduces updates to the Nginx Proxy Manager, focusing on version upgrades, configuration path changes, and dependency modifications. The changes include updating the base Docker image, Nginx Proxy Manager version, and various package versions. A significant modification is the migration of data and configuration paths from /data/ to /config/, which affects multiple files across the project. Additionally, logging configurations have been updated to redirect logs to Docker's standard output, and some Python package installation processes have been streamlined.

Changes

File Change Summary
proxy-manager/Dockerfile - Updated base image from 0.2.2 to 0.2.5
- Updated Nginx Proxy Manager version from v2.10.4 to v2.12.1
- Updated package versions for openssl-dev, python3-dev, and python3
proxy-manager/patches/0001-patch-data-to-config-folder.patch - Replaced /data/ paths with /config/ in multiple backend files
- Updated file paths for configuration, certificates, and database files
proxy-manager/patches/0002-Patch-redirect-logs-to-docker-output.patch - Redirected Nginx logs to Docker's standard output /proc/1/fd/1
- Updated log configurations across multiple template files
proxy-manager/patches/0002-patch-sass-version-in-frontend.patch - Updated node-sass from ^6.0.1 to ^8.0.0
- Updated sass-loader from 10.2.0 to 10.4.1
proxy-manager/patches/0003-Patch-npm-certbot-venv-plugin-handling.patch - Simplified Python package installation command
- Removed virtual environment activation steps
proxy-manager/patches/0004-patch-certbot-venv-plugin-handling.patch - Streamlined Certbot plugin installation process
- Removed venv activation in installation commands
proxy-manager/requirements.txt - Updated certbot-dns-cloudflare from 2.10.0 to 2.11.0
proxy-manager/build.yaml - Updated base image version from 0.2.2 to 0.2.5 for multiple architectures

Sequence Diagram

sequenceDiagram
    participant Docker as Docker Build
    participant Base as Base Image
    participant NPM as Nginx Proxy Manager
    participant Config as Configuration
    
    Docker->>Base: Use updated base-nodejs:0.2.5
    Base->>NPM: Install NPM v2.12.1
    NPM->>Config: Migrate paths from /data/ to /config/
    Config->>Docker: Redirect logs to stdout
Loading

Poem

🐰 A Proxy Manager's Tale of Change

From data paths to config's new range,
Logs dancing to Docker's sweet song,
Versions bumped, dependencies strong,
A rabbit's update, precise and clean,
Nginx proxy, now more serene! 🚀

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. This feature will be included in our Pro Plan when released.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0948873 and 32c48fc.

📒 Files selected for processing (1)
  • proxy-manager/build.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • proxy-manager/build.yaml

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. (Beta)
  • @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

@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

🧹 Outside diff range and nitpick comments (1)
proxy-manager/patches/0003-Patch-npm-certbot-venv-plugin-handling.patch (1)

20-22: Consider enhancing error handling

The command execution and logging look good, but consider adding specific error messages for common pip installation failures.

 return utils.exec(cmd)
   .then((result) => {
     logger.complete(`Installed ${pluginKey}`);
+  })
+  .catch((error) => {
+    logger.error(`Failed to install ${pluginKey}: ${error.message}`);
+    throw error;
   });
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 833fc71 and 0948873.

📒 Files selected for processing (7)
  • proxy-manager/Dockerfile (3 hunks)
  • proxy-manager/patches/0001-patch-data-to-config-folder.patch (18 hunks)
  • proxy-manager/patches/0002-Patch-redirect-logs-to-docker-output.patch (5 hunks)
  • proxy-manager/patches/0002-patch-sass-version-in-frontend.patch (0 hunks)
  • proxy-manager/patches/0003-Patch-npm-certbot-venv-plugin-handling.patch (1 hunks)
  • proxy-manager/patches/0004-patch-certbot-venv-plugin-handling.patch (0 hunks)
  • proxy-manager/requirements.txt (1 hunks)
💤 Files with no reviewable changes (2)
  • proxy-manager/patches/0002-patch-sass-version-in-frontend.patch
  • proxy-manager/patches/0004-patch-certbot-venv-plugin-handling.patch
✅ Files skipped from review due to trivial changes (1)
  • proxy-manager/requirements.txt
🔇 Additional comments (6)
proxy-manager/patches/0003-Patch-npm-certbot-venv-plugin-handling.patch (2)

15-16: LGTM: Version replacement handling

The version replacement logic for plugin dependencies and versions is maintained correctly.


18-19: Review virtual environment handling changes

The removal of virtual environment activation/deactivation and cache control flags raises several concerns:

  1. Without virtual environment activation, packages might install system-wide instead of in the isolated certbot environment
  2. Removing --no-cache-dir could affect build reproducibility

Let's verify the virtual environment setup and package installation location:

proxy-manager/Dockerfile (2)

1-1: LGTM: Version updates look good

The updates to the base image (0.2.2 → 0.2.5) and Nginx Proxy Manager (2.10.4 → 2.12.1) are minor version increments, suggesting backward compatibility is maintained.

Also applies to: 16-16


19-21: LGTM: Security-related package updates

Good security practices observed:

  • Addition of explicit libcrypto3 and libssl3 dependencies
  • Updates to OpenSSL and Python packages to latest patch versions

Also applies to: 26-26, 28-28, 37-37, 39-39

proxy-manager/patches/0002-Patch-redirect-logs-to-docker-output.patch (1)

Line range hint 1-140: LGTM: Excellent logging practice for containerized applications

The patch correctly redirects all Nginx logs to Docker's standard output (/proc/1/fd/1), which:

  • Follows container best practices
  • Enables centralized log collection
  • Simplifies log management in orchestrated environments
proxy-manager/patches/0001-patch-data-to-config-folder.patch (1)

Line range hint 1-427: Path migration implementation looks good, but verify migration strategy

The patch consistently updates all paths from /data to /config, affecting:

  • Configuration files
  • SSL certificates
  • Database location
  • Access lists
  • Log files

While the implementation is thorough, this change could impact existing installations.

Let's check if there's a migration strategy in place:

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.

1 participant