This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
3,278 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"env": { | ||
"test": { | ||
"plugins": [ | ||
"@babel/plugin-transform-modules-commonjs" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
* text=auto | ||
*.sh eol=lf | ||
*.yml eol=lf | ||
**/run eol=lf | ||
**/finish eol=lf | ||
**/services.d/** eol=lf | ||
**/cont-init.d/** eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: docker | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- dependencies | ||
commit-message: | ||
prefix: fix | ||
include: scope | ||
- package-ecosystem: gradle | ||
directory: "/tests" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- dependencies | ||
commit-message: | ||
prefix: chore | ||
include: scope | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- dependencies | ||
commit-message: | ||
prefix: ci | ||
include: scope |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
titleOnly: true | ||
types: | ||
- feat | ||
- fix | ||
- docs | ||
- refactor | ||
- test | ||
- build | ||
- ci | ||
- chore | ||
- revert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: CI/CD | ||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # To add version tags | ||
packages: write # To push docker image | ||
issues: write # Semantic release to link issues | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- uses: homecentr/action-build-docker-image@master | ||
with: | ||
imageName: "homecentr/frigate" | ||
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | ||
dockerHubUserName: ${{ secrets.DOCKERHUB_USERNAME }} | ||
dockerHubPassword: ${{ secrets.DOCKERHUB_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
*.class | ||
*.jar | ||
*.war | ||
*.ear | ||
.gradle | ||
build | ||
.gradletasknamecache | ||
|
||
**/.idea/workspace.xml | ||
**/.idea/tasks.xml | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar | ||
|
||
# Cache of project | ||
.gradletasknamecache | ||
|
||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"**/Thumbs.db": true, | ||
"node_modules": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM blakeblackshear/frigate:0.10.0-amd64 | ||
|
||
ARG USER_UID=1000 | ||
ARG USER_GID=1000 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends supervisor=4.1.0-1ubuntu1 && \ | ||
addgroup --gid 1000 nonroot && \ | ||
adduser -u 1000 -G nonroot -D -H -g "" nonroot && \ | ||
ln -sf /dev/stdout /usr/local/nginx/logs/access.log && \ | ||
ln -sf /dev/stderr /usr/local/nginx/logs/error.log && \ | ||
rm -rf /etc/services.d && \ | ||
rm -rf /etc/conf-init.d && \ | ||
rm -rf /etc/conf-finish.d && \ | ||
apt-get autoremove --yes && \ | ||
rm -rf /var/lib/apt && \ | ||
rm -rf /var/lib/dpkg && \ | ||
rm -rf /var/lib/cache && \ | ||
rm -rf /var/lib/log | ||
|
||
COPY ./root/ / | ||
|
||
USER ${USER_UID}:${USER_GID} | ||
|
||
EXPOSE 5000 | ||
EXPOSE 1935 | ||
|
||
ENTRYPOINT [ "supervisord", "-c", "/etc/supervisor.conf" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
# docker-frigate | ||
[](https://github.com/homecentr/docker-frigate/graphs/commit-activity) [](https://github.com/homecentr/docker-frigate/labels/bug) [](https://hub.docker.com/repository/docker/homecentr/frigate) | ||
[](https://hub.docker.com/repository/docker/homecentr/frigate) | ||
[](https://hub.docker.com/repository/docker/homecentr/frigate) | ||
|
||
[](https://github.com/homecentr/docker-frigate/actions/workflows/ci_cd.yml) | ||
|
||
|
||
# Homecentr - Frigate | ||
|
||
## Exposed ports | ||
|
||
| Port | Protocol | Description | | ||
|------|------|-------------| | ||
| 5000 | TCP | HTTP Web UI | | ||
| 1935 | TCP | RTSP | | ||
|
||
## Volumes | ||
|
||
| Container path | Description | | ||
|------------|---------------| | ||
| /config | The container expects config file at `/config/config.yml` | | ||
|
||
## Security | ||
The container is regularly scanned for vulnerabilities and updated. Further info can be found in the [Security tab](https://github.com/homecentr/docker-frigate/security). | ||
|
||
### Container user | ||
The container uses UID:GID of 1000:1000 by default. The image needs to be rebuilt if you need to change the UID/GID. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Security policy | ||
|
||
## Disclosure policy | ||
|
||
In case you find a security issues with this docker image, please reach out to me at security@homecentr.io and provide 5 business days to release a fixed version. | ||
|
||
## Security update policy | ||
|
||
Known security issues will be published in GitHub repository's Security / Security advisories. | ||
|
||
## Automated processes | ||
|
||
The Docker image is regularly scanned for vulnerabilities with [Snyk.io](https://snyk.io/). | ||
|
||
The dependencies are automatically scanned using [Dependabot](https://dependabot.com/). Dependencies are regularly updated. You can check for pending dependency updates by listing open Pull requests with the "dependencies" label. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
version: "3.9" | ||
services: | ||
image: | ||
build: . | ||
image: homecentr/frigate:preview | ||
user: 1000:1000 | ||
read_only: true | ||
depends_on: | ||
- mqtt | ||
networks: | ||
internal: | ||
ports: | ||
- "5000:5000" | ||
- "1935:1935" | ||
volumes: | ||
- "./example/frigate.yml:/config/config.yml:ro" | ||
tmpfs: | ||
- /tmp | ||
- /media/frigate | ||
|
||
mqtt: | ||
image: eclipse-mosquitto | ||
ports: | ||
- "1883:1883" | ||
volumes: | ||
- "./example/mosquitto.conf:/mosquitto/config/mosquitto.conf" | ||
networks: | ||
internal: | ||
|
||
networks: | ||
internal: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
mqtt: | ||
host: mqtt | ||
port: 1883 | ||
|
||
cameras: | ||
camera_1: | ||
ffmpeg: | ||
inputs: | ||
- path: rtsp://10.0.10.10:554/rtsp | ||
roles: | ||
- detect | ||
- rtmp | ||
detect: | ||
width: 1280 | ||
height: 720 | ||
motion: | ||
mask: | ||
- 0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
allow_anonymous true | ||
listener 1883 0.0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "@homecentr/frigate", | ||
"version": "1.0.0", | ||
"description": "", | ||
"author": "Lukas Holota", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "docker-compose build", | ||
"start": "docker-compose up", | ||
"start:shell": "docker-compose run --user=0:0 --entrypoint bash image", | ||
"test": "jest --testTimeout=60000", | ||
"push:preview": "docker-compose push image", | ||
"clean": "docker-compose down" | ||
}, | ||
"release": { | ||
"branches": [ | ||
"master" | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-transform-modules-commonjs": "^7.18.6", | ||
"axios": "^0.27.2", | ||
"cross-env": "^7.0.3", | ||
"jest": "^28.1.3", | ||
"testcontainers": "^8.12.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[supervisord] | ||
nodaemon=true | ||
logfile=/dev/stdout | ||
logfile_maxbytes = 0 | ||
pidfile=/tmp/supervisord.pid | ||
|
||
[program:frigate] | ||
command=python3 -u -m frigate | ||
autostart=true | ||
autorestart=true | ||
stderr_logfile=/dev/stdout | ||
stderr_logfile_maxbytes = 0 | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes = 0 | ||
pidfile=/tmp/ | ||
|
||
[program:nginx] | ||
command=/usr/local/nginx/sbin/nginx | ||
autostart=true | ||
autorestart=true | ||
stderr_logfile=/dev/stdout | ||
stderr_logfile_maxbytes = 0 | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes = 0 |
Oops, something went wrong.