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

update contributing docs #4727

Merged
merged 1 commit into from
Dec 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) .

Expand Down
15 changes: 6 additions & 9 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
```