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 some info to the README.md about the local development docker containers #1114

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

jbirddog
Copy link
Contributor

@jbirddog jbirddog commented Feb 27, 2024

Summary by CodeRabbit

  • Documentation
    • Updated README with instructions for using Docker in local development, including details on using development containers, managing dependencies, and utilizing Makefile for various tasks like building images, starting/stopping servers, and running tests.

Copy link
Contributor

coderabbitai bot commented Feb 27, 2024

Walkthrough

Walkthrough

This update introduces instructions for utilizing Docker in local development environments. It focuses on integrating development docker containers and provides a comprehensive guide on using the Makefile for various tasks such as building images, managing servers, executing tests, and handling dependencies. The Makefile is highlighted as the central reference for all available make targets, streamlining the development process.

Changes

File(s) Change Summary
README.md Added instructions for Docker usage in local development, including Makefile targets for various development tasks.

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.

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.

Review Status

Actionable comments generated: 1

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 9d8a7a7 and 4317be2.
Files selected for processing (1)
  • README.md (1 hunks)

Comment on lines +70 to +86
### Using Docker for Local Development

If you have `docker` and `docker compose`, as an alternative to locally installing the required dependencies, you can leverage the development docker containers and `Makefile` while working locally. To use, clone the repo and run `make`. This will build the required images, install all dependencies, start the servers and run the linting and tests. Once complete you can [open the app](http://localhost:8001) and code changes will be reflected while running.

After the containers are set up, you can run `make start-dev` and `make stop-dev` to start and stop the servers. If the frontend or backend lock file changes, `make dev-env` will recreate the containers with the new dependencies.

Please refer to the [Makefile](Makefile) as the source of truth, but for a summary of the available `make` targets.

| Target | Action |
|----|----|
| dev-env | Builds the images, sets up the backend db and installs `npm` and `poetry` dependencies |
| start-dev | Starts the frontend and backend servers, also stops them first if they were already running |
| stop-dev | Stops the frontend and backend servers |
| be-tests-par | Runs the backend unit tests in parallel |
| fe-lint-fix | Runs `npm lint:fix` in the frontend container |
| run-pyl | Runs all frontend and backend lints, backend unit tests |

Copy link
Contributor

Choose a reason for hiding this comment

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

The new section on "Using Docker for Local Development" is a valuable addition, providing clear instructions for leveraging Docker and Makefile in the development process. However, there are a few areas that could be enhanced for clarity and completeness:

  1. Link to Docker Installation: It might be helpful for beginners if there was a direct link to Docker's installation guide. This would make it easier for someone new to Docker to get started.
  2. Explanation of make Command: While the document assumes familiarity with make, a brief explanation or link to resources about make and its importance could be beneficial for newcomers.
  3. Details on make Targets: The table summarizing make targets is useful, but a bit more detail on what each target does behind the scenes could provide better insight, especially for targets like dev-env and run-pyl.
  4. Troubleshooting Section: Including a small troubleshooting section or common issues might save developers time if they encounter any problems while setting up or using Docker for development.

Consider adding these enhancements to make the instructions even more accessible and informative for all developers, regardless of their experience level with Docker or make.

@jbirddog jbirddog merged commit 78be11d into main Feb 27, 2024
22 checks passed
@jbirddog jbirddog deleted the jbirddog-patch-2 branch February 27, 2024 23:03
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