Skip to content

Commit

Permalink
update contributing docs (blakeblackshear#4727)
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Dec 18, 2022
1 parent c85df9c commit 161991d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
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
```

0 comments on commit 161991d

Please sign in to comment.