-
Notifications
You must be signed in to change notification settings - Fork 43
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
Conversation
WalkthroughWalkthroughThis 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 Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### 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 | | ||
|
There was a problem hiding this comment.
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:
- 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.
- Explanation of
make
Command: While the document assumes familiarity withmake
, a brief explanation or link to resources aboutmake
and its importance could be beneficial for newcomers. - Details on
make
Targets: The table summarizingmake
targets is useful, but a bit more detail on what each target does behind the scenes could provide better insight, especially for targets likedev-env
andrun-pyl
. - 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
.
Summary by CodeRabbit
Makefile
for various tasks like building images, starting/stopping servers, and running tests.