From 161991df1f05400ed2578ba1faba80d86beb2502 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 17 Dec 2022 18:02:14 -0600 Subject: [PATCH] update contributing docs (#4727) --- Makefile | 3 --- docs/docs/contributing.md | 15 ++++++--------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 54182f68c..b4d201c71 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,6 @@ version: local: version docker buildx build --tag frigate:latest --load . -build_web: - docker buildx build --target web-dist --output web/dist . - amd64: docker buildx build --platform linux/amd64 --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) . diff --git a/docs/docs/contributing.md b/docs/docs/contributing.md index 8229b8abe..462177a3f 100644 --- a/docs/docs/contributing.md +++ b/docs/docs/contributing.md @@ -40,9 +40,11 @@ Fork [blakeblackshear/frigate-hass-integration](https://github.com/blakeblackshe ### Setup -#### 1. Build the version information and docker container locally by running `make` +#### 1. Open the repo with Visual Studio Code -#### 2. Create a local config file for testing +Upon opening, you should be prompted to open the project in a remote container. This will build a container on top of the base frigate container with all the development dependencies installed. This ensures everyone uses a consistent development environment without the need to install any dependencies on your host machine. + +#### 2. Modify your local config file for testing Place the file at `config/config.yml` in the root of the repo. @@ -73,18 +75,14 @@ These input args tell ffmpeg to read the mp4 file in an infinite loop. You can u Create and place these files in a `debug` folder in the root of the repo. This is also where recordings will be created if you enable them in your test config. Update your config from step 2 above to point at the right file. You can check the `docker-compose.yml` file in the repo to see how the volumes are mapped. -#### 4. Open the repo with Visual Studio Code - -Upon opening, you should be prompted to open the project in a remote container. This will build a container on top of the base frigate container with all the development dependencies installed. This ensures everyone uses a consistent development environment without the need to install any dependencies on your host machine. - -#### 5. Run frigate from the command line +#### 4. Run frigate from the command line VSCode will start the docker compose file for you and open a terminal window connected to `frigate-dev`. - Run `python3 -m frigate` to start the backend. - In a separate terminal window inside VS Code, change into the `web` directory and run `npm install && npm start` to start the frontend. -#### 6. Teardown +#### 5. Teardown After closing VSCode, you may still have containers running. To close everything down, just run `docker-compose down -v` to cleanup all containers. @@ -219,6 +217,5 @@ docker buildx stop builder && docker buildx rm builder # <---- if existing docker run --privileged --rm tonistiigi/binfmt --install all docker buildx create --name builder --driver docker-container --driver-opt network=host --use docker buildx inspect builder --bootstrap -make build_web make push ```