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

Add browser to docker image #559

Merged
merged 78 commits into from
Feb 13, 2024

Conversation

dudizimber
Copy link
Contributor

@dudizimber dudizimber commented Feb 5, 2024

Issue: #558

Requires the browser image to be deployed first to falkordb/falkordb-browser

Summary by CodeRabbit

  • New Features
    • Enhanced automation by modifying the build process to trigger only for approved PRs targeting the master branch.
    • Updated the Docker environment to support FalkorDB Browser with specific configurations, including Node.js installation and environment variables for TLS and browser mode.
  • Chores
    • Improved the Docker run script to dynamically handle browser-related operations and conditional TLS certificate generation.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 5, 2024
Copy link

coderabbitai bot commented Feb 5, 2024

Walkthrough

This update introduces a sophisticated deployment process for a specific application, focusing on conditional workflow execution, Docker container enhancements, and script adjustments for environment-based operations. It aims to streamline the build and deployment process, particularly for applications requiring a specific runtime environment, and ensures that changes are efficiently managed and deployed under defined conditions.

Changes

File Path Change Summary
.github/workflows/build.yml
build/docker/Dockerfile
build/docker/run.sh
Added condition for the build job to run on manual dispatch or approved PRs to master. Enhanced Dockerfile with a new base image, nodejs installation, app directory setup, and new environment variables. Modified run.sh script to dynamically evaluate BROWSER variable for Node.js server execution and added TLS checks.

Related issues

  • Create a docker container for FalkorDB-browser falkordb-browser#74: The changes in the Dockerfile and run.sh script address the objective of streamlining the deployment of FalkorDB-browser by encapsulating the environment and ensuring all dependencies are included, which aligns with the issue's goal of creating a Docker container for FalkorDB-browser.

Poem

In the code's vast sea, a Docker sets sail, 🚢
With scripts and workflows, it braves the gale. 🌬️
"To master branch!" the rabbit commands, 🐇
"With approved PRs, we reach new lands!" 🌍

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>.
    • Generate unit-tests for this file.
  • 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 tests 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 generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Feb 8, 2024
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.

Review Status

Actionable comments generated: 2

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 28c09ce and 3c0edfb.
Files selected for processing (3)
  • .github/workflows/build.yml (1 hunks)
  • build/docker/Dockerfile (2 hunks)
  • build/docker/run.sh (1 hunks)
Additional comments: 6
build/docker/run.sh (1)
  • 11-11: Ensure that the gen-certs.sh script and redis-server command are correctly handling errors and exceptions, especially when generating certificates or starting the server fails.
build/docker/Dockerfile (4)
  • 8-8: Using falkordb/falkordb-browser as a base image is a significant change. Ensure that all necessary dependencies for the main application are still met with this new base image.
  • 13-13: Combining apt-get update and apt-get install in a single RUN instruction and removing /var/lib/apt/lists/* afterwards is good for minimizing the image size. However, consider verifying the specific version of nodejs to ensure compatibility with the browser functionality.
  • 22-22: Ensure that the /app directory in the browser stage contains all necessary files for the browser functionality and that no sensitive information is being copied into the Docker image.
  • 26-28: Introduction of TLS=0 and BROWSER=1 environment variables is clear. Ensure that these variables are documented and that their usage within the application is secure and consistent.
.github/workflows/build.yml (1)
  • 17-17: The condition added to the build job is specific and ensures that builds are triggered only under certain conditions. Verify that this logic aligns with the project's workflow requirements and that there are no scenarios where a build might be unintentionally skipped.

build/docker/run.sh Outdated Show resolved Hide resolved
build/docker/run.sh Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
remove if from job
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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 3c0edfb and debf93f.
Files selected for processing (1)
  • build/docker/run.sh (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • build/docker/run.sh

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 13, 2024
@AviAvni AviAvni merged commit 55a536d into FalkorDB:master Feb 13, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants