Skip to content

Conversation

@nightknighto
Copy link
Contributor

@nightknighto nightknighto commented Mar 22, 2025

Description

Improves the Dockerized development workflow of the project.

  • Adds a Docker Compose.
  • Replaces mounting with Develop specification.
  • Updates the relevant documentation.

Related issue(s)

Fixes #3919

Screenshots

Screenshot showcasing changes being transferred and the development server refreshing.
image

Summary by CodeRabbit

  • Documentation

    • Streamlined local setup instructions to use a single Docker Compose command, reducing manual steps.
  • New Features

    • Introduced a new container service for the website, offering direct access via port 3000 and live file updates for a smoother development experience.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 22, 2025

Walkthrough

The changes streamline the Docker development setup. The README now instructs users to run the project with a single command (docker compose up --watch), eliminating the previous manual steps. Additionally, a new service named website is added to the docker-compose.yaml file with specific configurations for container naming, image building, port mapping, and a development configuration for syncing files.

Changes

File(s) Change Summary
README.md Removed detailed Docker build/run instructions; now instructs users to use docker compose up --watch for running the project.
docker-compose.yaml Added new website service with container name asyncapi-website, image asyncapi-website, build context set to the current directory, port 3000 binding, and development configuration for file syncing.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Compose as Docker Compose
    participant Daemon as Docker Daemon
    participant Website as Website Container

    Dev->>Compose: Run "docker compose up --watch"
    Compose->>Daemon: Build and configure services (including "website")
    Daemon->>Website: Build container with specified context, port and sync settings
    Website-->>Daemon: Container started and ready
Loading

Assessment against linked issues

Objective Addressed Explanation
Upgrade Docker development workflow by using docker-compose for simplified command and management (#3919)
Replace manual run command with a more intuitive command (#3919)
Implement Docker Develop specification for syncing files (#3919)

Poem

I'm a little rabbit with a knack for code,
Hopping through Docker lanes down the streamlined road.
"docker compose up" makes my journey light and free,
New services bloom like carrots in a container tree.
With every build and mount, my paws tap with glee!
🐇🚀


🪧 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.

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

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@netlify
Copy link

netlify bot commented Mar 22, 2025

Deploy Preview for asyncapi-website ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 39f3ff4
🔍 Latest deploy log https://app.netlify.com/projects/asyncapi-website/deploys/687dbaf7cb47c90008a9a692
😎 Deploy Preview https://deploy-preview-3943--asyncapi-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov
Copy link

codecov bot commented Mar 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (88d5584) to head (39f3ff4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #3943   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines          778       778           
  Branches       144       144           
=========================================
  Hits           778       778           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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 (2)
docker-compose.yaml (1)

1-11: Docker Compose Service Configuration Review

The service definition for website is generally well structured and meets the objective of streamlining the Dockerized development workflow. However, please verify that the property pull_policy: build (line 6) is supported by your version of Docker Compose. This key is more common in Kubernetes (as imagePullPolicy) and might not be recognized in a standard Docker Compose file.

README.md (1)

123-128: Improve Clarity in Docker Compose Instructions

The instructions on running Docker Compose can be made clearer by adding the missing article and adjusting the phrasing. For example, consider revising the sentence for better readability and accuracy.

Below is a proposed diff:

-After cloning repository to your local, run the docker compose from the root of the repository.
+After cloning the repository to your local machine, navigate to the root of the repository and run:

And ensure the following command block remains:

docker compose up
🧰 Tools
🪛 LanguageTool

[uncategorized] ~123-~123: You might be missing the article “the” here.
Context: ...docker.com/get-docker/) After cloning repository to your local, run the docker compose f...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[grammar] ~123-~123: The usual collocation for “compose” is “of”, not “from”. Did you mean “compose of”?
Context: ...epository to your local, run the docker compose from the root of the repository. ```bash d...

(COMPOSE_FROM_OF)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7194afd and 54c9763.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • docker-compose.yaml (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~123-~123: You might be missing the article “the” here.
Context: ...docker.com/get-docker/) After cloning repository to your local, run the docker compose f...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[grammar] ~123-~123: The usual collocation for “compose” is “of”, not “from”. Did you mean “compose of”?
Context: ...epository to your local, run the docker compose from the root of the repository. ```bash d...

(COMPOSE_FROM_OF)

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 (2)
docker-compose.yaml (1)

1-16: Service configuration and custom keys review:
The new website service is set up correctly with container naming, image assignment, build context, and port mapping. However, note that the properties pull_policy and develop (with its nested watch configuration) are not part of the official Docker Compose specification. Make sure that these keys are supported by your current Docker Compose version or custom tooling. It would be beneficial to add inline comments or update the documentation to explain their purpose and behavior for future maintainability.

README.md (1)

123-129: Clarify and polish Docker instruction text:
The updated instructions for running the project in Docker watch mode align well with the new service configuration in docker-compose.yaml. Consider rephrasing the sentence on line 123 for improved clarity. For example, change:

-After cloning repository to your local, run the docker compose in watch mode from the root of the repository.
+After cloning the repository locally, run docker compose in watch mode from the repository root.

This small refinement enhances readability and professionalism.

🧰 Tools
🪛 LanguageTool

[style] ~129-~129: Consider shortening or rephrasing this to strengthen your wording.
Context: ...local copy of the website. Whenever you make changes to the code, the website will refresh and ...

(MAKE_CHANGES)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 54c9763 and a848571.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • docker-compose.yaml (1 hunks)

@lohargaurav00
Copy link

i have also upgraded docker file too for better build let me know if you would like to see it

@nightknighto
Copy link
Contributor Author

@lohargaurav00 This feature doesn't need an update in the Dockerfile. If you have improvements for the Dockerfile, feel free to open a new issue.

@nightknighto
Copy link
Contributor Author

@anshgoyalevil @AceTheCreator hello. could you please have a look at this PR?

Copy link
Member

@devilkiller-ag devilkiller-ag left a comment

Choose a reason for hiding this comment

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

The docker-compose setup looks good to me.

Copy link
Member

@devilkiller-ag devilkiller-ag left a comment

Choose a reason for hiding this comment

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

@nightknighto Please update the branch, and re-run failing tests.

@nightknighto
Copy link
Contributor Author

@devilkiller-ag Done

@vishvamsinh28
Copy link
Contributor

@nightknighto update the branch

@nightknighto
Copy link
Contributor Author

@vishvamsinh28 done

@vishvamsinh28
Copy link
Contributor

@anshgoyalevil could you also take a look at this PR ?

@asyncapi-bot
Copy link
Contributor

⚡️ Lighthouse report for the changes in this PR:

Category Score
🔴 Performance 36
🟢 Accessibility 98
🟢 Best practices 92
🟢 SEO 100
🔴 PWA 33

Lighthouse ran on https://deploy-preview-3943--asyncapi-website.netlify.app/

@nightknighto
Copy link
Contributor Author

@devilkiller-ag @vishvamsinh28 @anshgoyalevil @thulieblack
This PR is approved, could you please merge?

@TRohit20 TRohit20 merged commit c0e52d1 into asyncapi:master Jul 21, 2025
17 checks 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.

[FEATURE] Upgrade Docker development workflow to use docker compose and Develop specification

8 participants