From e0a0b25d226a89e4d49fe73815d3c4ca4c734f13 Mon Sep 17 00:00:00 2001 From: Fred Clausen <43556888+fredclausen@users.noreply.github.com> Date: Thu, 12 Oct 2023 09:34:11 -0600 Subject: [PATCH 1/7] linting/precommit --- .dictionary.txt | 1 + .dockerignore | 2 +- .github/workflows/cancel_dupes.yml | 9 +- .github/workflows/check_versions.yml | 2 - .github/workflows/flake8.yml | 3 +- .github/workflows/hadolint.yml | 3 +- .github/workflows/markdownlint.yml | 4 +- .github/workflows/on_pr.yml | 15 +- .github/workflows/pre-commit-updates.yaml | 23 + .github/workflows/yamllint.yml | 2 +- .markdownlint.json | 4 +- .pre-commit-config.yaml | 65 +++ Dockerfile | 4 + README.md | 462 +++++++++---------- rootfs/etc/s6-overlay/scripts/04-telegraf | 2 +- rootfs/etc/s6-overlay/scripts/lighttpd | 2 +- rootfs/etc/s6-overlay/scripts/stats | 2 +- rootfs/etc/s6-overlay/scripts/telegraf_socat | 2 +- rootfs/scripts/autogain.sh | 4 +- rootfs/scripts/stats.py | 8 +- 20 files changed, 353 insertions(+), 266 deletions(-) create mode 100644 .dictionary.txt create mode 100644 .github/workflows/pre-commit-updates.yaml create mode 100644 .pre-commit-config.yaml diff --git a/.dictionary.txt b/.dictionary.txt new file mode 100644 index 0000000..9ac17d5 --- /dev/null +++ b/.dictionary.txt @@ -0,0 +1 @@ +crate diff --git a/.dockerignore b/.dockerignore index df5e310..cdb1a82 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,4 +3,4 @@ .github .gitattributes READMETEMPLATE.md -README.md \ No newline at end of file +README.md diff --git a/.github/workflows/cancel_dupes.yml b/.github/workflows/cancel_dupes.yml index d5e6462..23cd838 100644 --- a/.github/workflows/cancel_dupes.yml +++ b/.github/workflows/cancel_dupes.yml @@ -1,15 +1,14 @@ --- - # Cancels duplicate github actions when superseded name: Cancelling Duplicates on: workflow_run: workflows: - - 'Pull Request' - - 'Deploy' - - 'Linting (Non-Image)' - types: ['requested'] + - "Pull Request" + - "Deploy" + - "Linting (Non-Image)" + types: ["requested"] jobs: cancel-duplicate-workflow-runs: diff --git a/.github/workflows/check_versions.yml b/.github/workflows/check_versions.yml index a02f094..9578c32 100644 --- a/.github/workflows/check_versions.yml +++ b/.github/workflows/check_versions.yml @@ -1,5 +1,4 @@ --- - name: Check upstream versions on: @@ -8,7 +7,6 @@ on: - cron: "0 12 * * *" jobs: - version_in_container: name: Check version in 'latest' image runs-on: ubuntu-latest diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index d23e5b2..9ac7271 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -7,10 +7,9 @@ on: branches: - main paths: - - '**.py' + - "**.py" jobs: - flake8-lint: name: Run flake8 against python files runs-on: ubuntu-latest diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml index 5f437f3..e6c83ad 100644 --- a/.github/workflows/hadolint.yml +++ b/.github/workflows/hadolint.yml @@ -7,10 +7,9 @@ on: branches: - main paths: - - 'Dockerfile' + - "Dockerfile" jobs: - hadolint: name: Run hadolint against docker files runs-on: ubuntu-latest diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index f66a129..664d54e 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -7,8 +7,8 @@ on: - main # only run these if markdown files are updated paths: - - '**.md' - - '**.MD' + - "**.md" + - "**.MD" jobs: markdownlint: diff --git a/.github/workflows/on_pr.yml b/.github/workflows/on_pr.yml index f592f67..35f2bb7 100644 --- a/.github/workflows/on_pr.yml +++ b/.github/workflows/on_pr.yml @@ -11,16 +11,15 @@ on: - main # Don't trigger if it's just a documentation update paths-ignore: - - '**.md' - - '**.MD' - - '**.yml' - - 'LICENSE' - - '.gitattributes' - - '.gitignore' - - '.dockerignore' + - "**.md" + - "**.MD" + - "**.yml" + - "LICENSE" + - ".gitattributes" + - ".gitignore" + - ".dockerignore" jobs: - test-build: name: Test uses: sdr-enthusiasts/common-github-workflows/.github/workflows/build_and_push_image.yml@main diff --git a/.github/workflows/pre-commit-updates.yaml b/.github/workflows/pre-commit-updates.yaml new file mode 100644 index 0000000..f075972 --- /dev/null +++ b/.github/workflows/pre-commit-updates.yaml @@ -0,0 +1,23 @@ +name: Update pre-commit hooks + +on: + workflow_dispatch: + schedule: + - cron: 0 0 * * * + +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.0 + with: + fetch-depth: 0 + - uses: vrslev/pre-commit-autoupdate@v1.0.0 + - uses: peter-evans/create-pull-request@v5 + with: + branch: pre-commit-autoupdate + title: "chore(deps): Update pre-commit hooks" + commit-message: "chore(deps): Update pre-commit hooks" + body: Update pre-commit hooks + labels: dependencies + delete-branch: True diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml index 2fff033..d3b07f9 100644 --- a/.github/workflows/yamllint.yml +++ b/.github/workflows/yamllint.yml @@ -7,7 +7,7 @@ on: - main # only run when yaml files are updated paths: - - '**.yml' + - "**.yml" jobs: yamllint: diff --git a/.markdownlint.json b/.markdownlint.json index f7f20c9..79aa8d7 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,3 +1,3 @@ { - "MD033": false -} \ No newline at end of file + "MD033": false +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..34ef282 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,65 @@ +repos: + # lint yaml, line and whitespace + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - id: requirements-txt-fixer + - id: mixed-line-ending + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + + # lint the dockerfiles + - repo: https://github.com/hadolint/hadolint + rev: v2.12.1-beta + hooks: + - id: hadolint + + # prettier + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v3.0.3" # Use the sha / tag you want to point at + hooks: + - id: prettier + types_or: [file, bash, sh, javascript, jsx, ts, tsx] + additional_dependencies: + - prettier@2.5.1 + exclude: ^(Dockerfile*) + + - repo: https://github.com/codespell-project/codespell.git + rev: "v2.2.5" # Use the sha / tag you want to point at + hooks: + - id: codespell + types: [text] + args: [--ignore-words=.dictionary.txt] + exclude: ^(Dockerfile*) + + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.9.0.6 + hooks: + - id: shellcheck + + - repo: https://github.com/sirosen/check-jsonschema + rev: 0.27.0 + hooks: + - id: check-github-actions + - id: check-github-workflows + + - repo: https://github.com/doublify/pre-commit-rust + rev: v1.0 + hooks: + - id: fmt + - id: cargo-check + + # lint python formatting + - repo: https://github.com/psf/black + rev: 23.9.1 + hooks: + - id: black + + - repo: https://github.com/pycqa/flake8 + rev: "6.1.0" # pick a git hash / tag to point to + hooks: + - id: flake8 + args: ["--extend-ignore=W503,W504,E501"] diff --git a/Dockerfile b/Dockerfile index f3ac3de..5817275 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,16 @@ # Declare the telegraf image so we can copy telegraf binary out of it, # and avoid headache of having to add apt key / apt repo and/or build from src. +# hadolint ignore=DL3008,SC2086,SC2039,SC2068,DL3006 FROM telegraf AS telegraf RUN touch /tmp/.nothing # Declare the wreadsb image so we can copy readsb binary out of it, # and avoid headache of having to add apt key / apt repo and/or build from src. +# hadolint ignore=DL3008,SC2086,SC2039,SC2068,DL3006 FROM ghcr.io/sdr-enthusiasts/docker-baseimage:wreadsb as wreadsb RUN touch /tmp/.nothing # Build final image +# hadolint ignore=DL3008,SC2086,SC2039,SC2068,DL3006 FROM ghcr.io/sdr-enthusiasts/docker-baseimage:dump978-full ENV PROMETHEUSPORT=9273 \ @@ -59,6 +62,7 @@ COPY --from=telegraf /usr/bin/telegraf /usr/bin/telegraf # Copy wreadsb COPY --from=wreadsb /usr/local/bin/readsb /usr/bin/readsb +# hadolint ignore=DL3008,SC2086,SC2039,SC2068 RUN set -x && \ TEMP_PACKAGES=() && \ KEPT_PACKAGES=() && \ diff --git a/README.md b/README.md index afcf295..ca10da1 100644 --- a/README.md +++ b/README.md @@ -41,19 +41,19 @@ UAT is currently only used in the USA, so don't bother with this if you're not l The container listens on the following TCP ports: -| Port | Description | -|------|-------------| -| `30978` | Raw UAT output (compatible with wiedehopf readsb's `uat_in`, but NOT compatible with `readsb`'s `raw_in`!) | -| `30979` | Decoded JSON output | +| Port | Description | +| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `30978` | Raw UAT output (compatible with wiedehopf readsb's `uat_in`, but NOT compatible with `readsb`'s `raw_in`!) | +| `30979` | Decoded JSON output | | `37981` | `uat2esnt/readsb` converted raw output. This IS compatible with `readsb`'s `raw_in`. (DEPRECATED, use `uat_in` on port 30978 or `beast_in` on port 37982!) | -| `37982` | `uat2esnt/readsb` converted beast output. This IS compatible with `readsb`'s `beast_in`. | -| `80` | Webserver for SkyAware978 and HTTP HealthCheck | +| `37982` | `uat2esnt/readsb` converted beast output. This IS compatible with `readsb`'s `beast_in`. | +| `80` | Webserver for SkyAware978 and HTTP HealthCheck | ## Paths & Volumes -| Path (inside container) | Details | -|-------------------------|---------| -| `/run/autogain` | Map this to persistant storage if you set `DUMP978_SDR_GAIN=autogain` | +| Path (inside container) | Details | +| ----------------------- | --------------------------------------------------------------------- | +| `/run/autogain` | Map this to persistent storage if you set `DUMP978_SDR_GAIN=autogain` | ## Up and Running - `docker run` @@ -75,12 +75,12 @@ docker run \ You can now: -* Add a net-connector to your readsb container, to pull data from port 37982 as `beast_in`, eg: `,37982,beast_in` -* Add the following environment variables to your piaware container: +- Add a net-connector to your readsb container, to pull data from port 37982 as `beast_in`, eg: `,37982,beast_in` +- Add the following environment variables to your piaware container: ```yaml - - UAT_RECEIVER_TYPE=relay - - UAT_RECEIVER_HOST= +- UAT_RECEIVER_TYPE=relay +- UAT_RECEIVER_HOST= ``` You should now be feeding UAT to most aggregators. @@ -93,175 +93,175 @@ Here is an example `docker-compose.yml`: <‐‐ Click the arrow to see the docker-compose.yml text ```yaml - dump978: -# dump978 gets UAT data from the SDR - image: ghcr.io/sdr-enthusiasts/docker-dump978 -# profiles: -# - donotstart - tty: true - container_name: dump978 - hostname: dump978 - restart: always - labels: - - "autoheal=true" - device_cgroup_rules: - - 'c 189:* rwm' - environment: - - TZ=${FEEDER_TZ} - - DUMP978_SDR_PPM=${ADSB_SDR_PPM} - - DUMP978_SDR_GAIN=${ADSB_SDR_GAIN} - - DUMP978_RTLSDR_DEVICE=${UAT_SDR_SERIAL} - - DUMP978_SDR_GAIN=${UAT_SDR_GAIN} - - DUMP978_SDR_PPM=${UAT_SDR_PPM} - - AUTOGAIN_INITIAL_PERIOD=7200 - volumes: - - /opt/adsb/dump978/autogain:/run/autogain - - /dev:/dev:ro - tmpfs: - - /run/readsb - - ultrafeeder: - image: ghcr.io/sdr-enthusiasts/docker-adsb-ultrafeeder - tty: true - container_name: ultrafeeder - hostname: ultrafeeder - restart: unless-stopped - device_cgroup_rules: - - 'c 189:* rwm' - ports: - - 8080:80 # to expose the web interface - - 9273-9274:9273-9274 # to expose the statistics interface to Prometheus - environment: - # -------------------------------------------------- - # general parameters: - - LOGLEVEL=error - - TZ=${FEEDER_TZ} - # -------------------------------------------------- - # SDR related parameters: - - READSB_DEVICE_TYPE=rtlsdr - - READSB_RTLSDR_DEVICE=${ADSB_SDR_SERIAL} - - READSB_RTLSDR_PPM=${ADSB_SDR_PPM} - # - # -------------------------------------------------- - # readsb/decoder parameters: - - READSB_LAT=${FEEDER_LAT} - - READSB_LON=${FEEDER_LONG} - - READSB_ALT=${FEEDER_ALT_M}m - - READSB_GAIN=${ADSB_SDR_GAIN} - - READSB_MODEAC=true - - READSB_RX_LOCATION_ACCURACY=2 - - READSB_STATS_RANGE=true - # - # -------------------------------------------------- - # Sources and Aggregator connections: - # (Note - remove the ones you are not using / feeding) - - ULTRAFEEDER_CONFIG= - adsb,dump978,30978,uat_in; - adsb,feed.adsb.fi,30004,beast_reduce_plus_out; - adsb,in.adsb.lol,30004,beast_reduce_plus_out; - adsb,feed.adsb.one,64004,beast_reduce_plus_out; - adsb,feed.planespotters.net,30004,beast_reduce_plus_out; - adsb,feed.theairtraffic.com,30004,beast_reduce_plus_out; - mlat,feed.adsb.fi,31090,39000; - mlat,in.adsb.lol,31090,39001; - mlat,feed.adsb.one,64006,39002; - mlat,mlat.planespotters.net,31090,39003; - mlat,feed.theairtraffic.com,31090,39004; - mlathub,piaware,30105,beast_in; - mlathub,rbfeeder,30105,beast_in; - mlathub,radarvirtuel,30105,beast_in - # If you really want to feed ADSBExchange, you can do so by adding this above: - # adsb,feed1.adsbexchange.com,30004,beast_reduce_plus_out,uuid=${ADSBX_UUID}; - # mlat,feed.adsbexchange.com,31090,39005,uuid=${ADSBX_UUID} - # - # -------------------------------------------------- - - UUID=${MULTIFEEDER_UUID} - - MLAT_USER=${FEEDER_NAME} - # - # -------------------------------------------------- - # TAR1090 (Map Web Page) parameters: - - UPDATE_TAR1090=true - - TAR1090_DEFAULTCENTERLAT=${FEEDER_LAT} - - TAR1090_DEFAULTCENTERLON=${FEEDER_LONG} - - TAR1090_MESSAGERATEINTITLE=true - - TAR1090_PAGETITLE=${FEEDER_NAME} - - TAR1090_PLANECOUNTINTITLE=true - - TAR1090_ENABLE_AC_DB=true - - TAR1090_FLIGHTAWARELINKS=true - - HEYWHATSTHAT_PANORAMA_ID=${FEEDER_HEYWHATSTHAT_ID} - - HEYWHATSTHAT_ALTS=${FEEDER_HEYWHATSTHAT_ALTS} - - TAR1090_SITESHOW=true - - TAR1090_RANGE_OUTLINE_COLORED_BY_ALTITUDE=true - - TAR1090_RANGE_OUTLINE_WIDTH=2.0 - - TAR1090_RANGERINGSDISTANCES=50,100,150,200 - - TAR1090_RANGERINGSCOLORS='#1A237E','#0D47A1','#42A5F5','#64B5F6' - - TAR1090_USEROUTEAPI=true - # - # -------------------------------------------------- - # GRAPHS1090 (Decoder and System Status Web Page) parameters: - # The two 978 related parameters should only be included if you are running dump978 for UAT reception (USA only) - - GRAPHS1090_DARKMODE=true - - URL_978=http://dump978/skyaware978 - volumes: - - /opt/adsb/ultrafeeder/globe_history:/var/globe_history - - /opt/adsb/ultrafeeder/graphs1090:/var/lib/collectd - - /proc/diskstats:/proc/diskstats:ro - - /dev:/dev:ro - tmpfs: - - /run:exec,size=256M - - /tmp:size=128M - - /var/log:size=32M - - piaware: +dump978: + # dump978 gets UAT data from the SDR + image: ghcr.io/sdr-enthusiasts/docker-dump978 + # profiles: + # - donotstart + tty: true + container_name: dump978 + hostname: dump978 + restart: always + labels: + - "autoheal=true" + device_cgroup_rules: + - "c 189:* rwm" + environment: + - TZ=${FEEDER_TZ} + - DUMP978_SDR_PPM=${ADSB_SDR_PPM} + - DUMP978_SDR_GAIN=${ADSB_SDR_GAIN} + - DUMP978_RTLSDR_DEVICE=${UAT_SDR_SERIAL} + - DUMP978_SDR_GAIN=${UAT_SDR_GAIN} + - DUMP978_SDR_PPM=${UAT_SDR_PPM} + - AUTOGAIN_INITIAL_PERIOD=7200 + volumes: + - /opt/adsb/dump978/autogain:/run/autogain + - /dev:/dev:ro + tmpfs: + - /run/readsb + +ultrafeeder: + image: ghcr.io/sdr-enthusiasts/docker-adsb-ultrafeeder + tty: true + container_name: ultrafeeder + hostname: ultrafeeder + restart: unless-stopped + device_cgroup_rules: + - "c 189:* rwm" + ports: + - 8080:80 # to expose the web interface + - 9273-9274:9273-9274 # to expose the statistics interface to Prometheus + environment: + # -------------------------------------------------- + # general parameters: + - LOGLEVEL=error + - TZ=${FEEDER_TZ} + # -------------------------------------------------- + # SDR related parameters: + - READSB_DEVICE_TYPE=rtlsdr + - READSB_RTLSDR_DEVICE=${ADSB_SDR_SERIAL} + - READSB_RTLSDR_PPM=${ADSB_SDR_PPM} + # + # -------------------------------------------------- + # readsb/decoder parameters: + - READSB_LAT=${FEEDER_LAT} + - READSB_LON=${FEEDER_LONG} + - READSB_ALT=${FEEDER_ALT_M}m + - READSB_GAIN=${ADSB_SDR_GAIN} + - READSB_MODEAC=true + - READSB_RX_LOCATION_ACCURACY=2 + - READSB_STATS_RANGE=true + # + # -------------------------------------------------- + # Sources and Aggregator connections: + # (Note - remove the ones you are not using / feeding) + - ULTRAFEEDER_CONFIG= + adsb,dump978,30978,uat_in; + adsb,feed.adsb.fi,30004,beast_reduce_plus_out; + adsb,in.adsb.lol,30004,beast_reduce_plus_out; + adsb,feed.adsb.one,64004,beast_reduce_plus_out; + adsb,feed.planespotters.net,30004,beast_reduce_plus_out; + adsb,feed.theairtraffic.com,30004,beast_reduce_plus_out; + mlat,feed.adsb.fi,31090,39000; + mlat,in.adsb.lol,31090,39001; + mlat,feed.adsb.one,64006,39002; + mlat,mlat.planespotters.net,31090,39003; + mlat,feed.theairtraffic.com,31090,39004; + mlathub,piaware,30105,beast_in; + mlathub,rbfeeder,30105,beast_in; + mlathub,radarvirtuel,30105,beast_in + # If you really want to feed ADSBExchange, you can do so by adding this above: + # adsb,feed1.adsbexchange.com,30004,beast_reduce_plus_out,uuid=${ADSBX_UUID}; + # mlat,feed.adsbexchange.com,31090,39005,uuid=${ADSBX_UUID} + # + # -------------------------------------------------- + - UUID=${MULTIFEEDER_UUID} + - MLAT_USER=${FEEDER_NAME} + # + # -------------------------------------------------- + # TAR1090 (Map Web Page) parameters: + - UPDATE_TAR1090=true + - TAR1090_DEFAULTCENTERLAT=${FEEDER_LAT} + - TAR1090_DEFAULTCENTERLON=${FEEDER_LONG} + - TAR1090_MESSAGERATEINTITLE=true + - TAR1090_PAGETITLE=${FEEDER_NAME} + - TAR1090_PLANECOUNTINTITLE=true + - TAR1090_ENABLE_AC_DB=true + - TAR1090_FLIGHTAWARELINKS=true + - HEYWHATSTHAT_PANORAMA_ID=${FEEDER_HEYWHATSTHAT_ID} + - HEYWHATSTHAT_ALTS=${FEEDER_HEYWHATSTHAT_ALTS} + - TAR1090_SITESHOW=true + - TAR1090_RANGE_OUTLINE_COLORED_BY_ALTITUDE=true + - TAR1090_RANGE_OUTLINE_WIDTH=2.0 + - TAR1090_RANGERINGSDISTANCES=50,100,150,200 + - TAR1090_RANGERINGSCOLORS='#1A237E','#0D47A1','#42A5F5','#64B5F6' + - TAR1090_USEROUTEAPI=true + # + # -------------------------------------------------- + # GRAPHS1090 (Decoder and System Status Web Page) parameters: + # The two 978 related parameters should only be included if you are running dump978 for UAT reception (USA only) + - GRAPHS1090_DARKMODE=true + - URL_978=http://dump978/skyaware978 + volumes: + - /opt/adsb/ultrafeeder/globe_history:/var/globe_history + - /opt/adsb/ultrafeeder/graphs1090:/var/lib/collectd + - /proc/diskstats:/proc/diskstats:ro + - /dev:/dev:ro + tmpfs: + - /run:exec,size=256M + - /tmp:size=128M + - /var/log:size=32M + +piaware: # piaware feeds ADS-B and UAT data (from ultrafeeder) to FlightAware. It also includes a GUI Radar website and a status website # If you're not capturing UAT data with the dump978 container, remove or comment out the UAT_RECEIVER_TYPE and UAT_RECEIVER_HOST lines in the environment section below. - image: ghcr.io/sdr-enthusiasts/docker-piaware - # profiles: - # - donotstart - tty: true - container_name: piaware - hostname: piaware - restart: always - labels: - - "autoheal=true" - ports: - - 8081:8080 - - 8088:80 - environment: - - BEASTHOST=ultrafeeder - - LAT=${FEEDER_LAT} - - LONG=${FEEDER_LONG} - - TZ=${FEEDER_TZ} - - FEEDER_ID=${PIAWARE_FEEDER_ID} - - UAT_RECEIVER_TYPE=relay - - UAT_RECEIVER_HOST=dump978 - tmpfs: - - /run:exec,size=64M - - /var/log - - rbfeeder: + image: ghcr.io/sdr-enthusiasts/docker-piaware + # profiles: + # - donotstart + tty: true + container_name: piaware + hostname: piaware + restart: always + labels: + - "autoheal=true" + ports: + - 8081:8080 + - 8088:80 + environment: + - BEASTHOST=ultrafeeder + - LAT=${FEEDER_LAT} + - LONG=${FEEDER_LONG} + - TZ=${FEEDER_TZ} + - FEEDER_ID=${PIAWARE_FEEDER_ID} + - UAT_RECEIVER_TYPE=relay + - UAT_RECEIVER_HOST=dump978 + tmpfs: + - /run:exec,size=64M + - /var/log + +rbfeeder: # rbfeeder feeds ADS-B and UAT data (from ultrafeeder) to RadarBox. # If you're not capturing UAT data with the dump978 container, remove or comment out the UAT_RECEIVER_HOST line in the environment section below. - image: ghcr.io/sdr-enthusiasts/docker-radarbox - # profiles: - # - donotstart - tty: true - container_name: rbfeeder - hostname: rbfeeder - restart: always - labels: - - "autoheal=true" - environment: - - BEASTHOST=ultrafeeder - - UAT_RECEIVER_HOST=dump978 - - LAT=${FEEDER_LAT} - - LONG=${FEEDER_LONG} - - ALT=${FEEDER_ALT_M} - - TZ=${FEEDER_TZ} - - SHARING_KEY=${RADARBOX_SHARING_KEY} - tmpfs: - - /run:exec,size=64M - - /var/log + image: ghcr.io/sdr-enthusiasts/docker-radarbox + # profiles: + # - donotstart + tty: true + container_name: rbfeeder + hostname: rbfeeder + restart: always + labels: + - "autoheal=true" + environment: + - BEASTHOST=ultrafeeder + - UAT_RECEIVER_HOST=dump978 + - LAT=${FEEDER_LAT} + - LONG=${FEEDER_LONG} + - ALT=${FEEDER_ALT_M} + - TZ=${FEEDER_TZ} + - SHARING_KEY=${RADARBOX_SHARING_KEY} + tmpfs: + - /run:exec,size=64M + - /var/log ``` @@ -272,23 +272,23 @@ You should now be feeding ADSB-ES & UAT to the "new" aggregators, FlightAware, a ### Container Options -| Variable | Description | Default | -|----------|-------------|---------| -| `TZ` | Local timezone in ["TZ database name" format](). | `UTC` | -| `LAT` | Latitude of your receiver. Only required if you want range statistics for InfluxDB or Prometheus, or if you are using the autogain script. | Unset | -| `LON` | Longitude of your receiver. Only required if you want range statistics for InfluxDB or Prometheus, or if you are using the autogain script. | Unset | +| Variable | Description | Default | +| -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `TZ` | Local timezone in ["TZ database name" format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). | `UTC` | +| `LAT` | Latitude of your receiver. Only required if you want range statistics for InfluxDB or Prometheus, or if you are using the autogain script. | Unset | +| `LON` | Longitude of your receiver. Only required if you want range statistics for InfluxDB or Prometheus, or if you are using the autogain script. | Unset | ### `dump978-fa` General Options Where the default value is "Unset", `dump978-fa`'s default will be used. -| Variable | Description | Controls which `dump978-fa` option | Default | -|----------|-------------|--------------------------------|---------| -| `DUMP978_DEVICE_TYPE` | Currently only `rtlsdr` is supported. If you have another type of radio, please open an issue and I'll try to get it added. | `--sdr driver=` | `rtlsdr` | -| `DUMP978_SDR_AGC` | Set to any value to enable SDR AGC. | `--sdr-auto-gain` | Unset | -| `DUMP978_SDR_GAIN` | Set gain (in dB). Use autogain to have the container determine an appropriate gain, more on this below. | `--sdr-gain` | Unset | -| `DUMP978_SDR_PPM` | Set SDR frequency correction in PPM. | `--sdr-ppm` | Unset | -| `DUMP978_JSON_STDOUT` | Write decoded json to the container log. Useful for troubleshooting, but don't leave enabled! | `--json-stdout` | Unset | +| Variable | Description | Controls which `dump978-fa` option | Default | +| --------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | -------- | +| `DUMP978_DEVICE_TYPE` | Currently only `rtlsdr` is supported. If you have another type of radio, please open an issue and I'll try to get it added. | `--sdr driver=` | `rtlsdr` | +| `DUMP978_SDR_AGC` | Set to any value to enable SDR AGC. | `--sdr-auto-gain` | Unset | +| `DUMP978_SDR_GAIN` | Set gain (in dB). Use autogain to have the container determine an appropriate gain, more on this below. | `--sdr-gain` | Unset | +| `DUMP978_SDR_PPM` | Set SDR frequency correction in PPM. | `--sdr-ppm` | Unset | +| `DUMP978_JSON_STDOUT` | Write decoded json to the container log. Useful for troubleshooting, but don't leave enabled! | `--json-stdout` | Unset | ### `dump978-fa` RTL-SDR Options @@ -296,78 +296,78 @@ Use with `DUMP978_DEVICE_TYPE=rtlsdr`. Where the default value is "Unset", `dump978-fa`'s default will be used. -| Variable | Description | Controls which `dump978-fa` option | Default | -|----------|-------------|--------------------------------|---------| -| `DUMP978_RTLSDR_DEVICE` | If using Select device by serial number. | `--sdr driver=rtlsdr,serial=` | Unset | +| Variable | Description | Controls which `dump978-fa` option | Default | +| ----------------------- | ---------------------------------------- | ---------------------------------- | ------- | +| `DUMP978_RTLSDR_DEVICE` | If using Select device by serial number. | `--sdr driver=rtlsdr,serial=` | Unset | ### General SDR Options -| Variable | Description | Default | -|----------|-------------|--------------------------------|---------| -| `DUMP978_ENABLE_BIASTEE` | Set to any value to enable bias-tee on your RTL-SDR. | Unset | +| Variable | Description | Default | +| ------------------------ | ---------------------------------------------------- | ------- | +| `DUMP978_ENABLE_BIASTEE` | Set to any value to enable bias-tee on your RTL-SDR. | Unset | ### Auto-Gain Options These variables control the auto-gain system (explained further below). These should rarely need changing from the defaults. -| Variable | Description | Default | -|----------|-------------|---------| -| `AUTOGAIN_INITIAL_PERIOD` | How long each gain level should be measured during auto-gain initialisation (ie: "roughing in"), in seconds. | `7200` (2 hours) | -| `AUTOGAIN_INITIAL_MSGS_ACCEPTED` | How many locally accepted messages should be received per gain level during auto-gain initialisaion to ensure accurate measurement. | `100000` | -| `AUTOGAIN_FINETUNE_PERIOD` | How long each gain level should be measured during auto-gain fine-tuning, in seconds. | `604800` (7 days) | -| `AUTOGAIN_FINETUNE_MSGS_ACCEPTED` | How many locally accepted messages should be received per gain level during auto-gain fine-tuning to ensure accurate measurement. | `700000` | -| `AUTOGAIN_FINISHED_PERIOD` | How long between the completion of fine-tuning (and ultimately setting a preferred gain), and re-running the entire process. | `31536000` (1 year) | -| `AUTOGAIN_MAX_GAIN_VALUE` | The maximum gain setting in dB that will be used by auto-gain. | `49.6` (max supported by `readsb`) | -| `AUTOGAIN_MIN_GAIN_VALUE` | The minimum gain setting in dB that will be used by auto-gain. | `0.0` (min supported by `readsb`) | -| `AUTOGAIN_PERCENT_STRONG_MESSAGES_MAX` | The maximum percentage of "strong messages" auto-gain will aim for. | `10.0` | -| `AUTOGAIN_PERCENT_STRONG_MESSAGES_MIN` | The minimum percentage of "strong messages" auto-gain will aim for. | `0.5` | -| `AUTOGAIN_SERVICE_PERIOD` | How often the auto-gain system will check results and perform actions, in seconds | `900` (15 minutes) | +| Variable | Description | Default | +| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | +| `AUTOGAIN_INITIAL_PERIOD` | How long each gain level should be measured during auto-gain initialisation (ie: "roughing in"), in seconds. | `7200` (2 hours) | +| `AUTOGAIN_INITIAL_MSGS_ACCEPTED` | How many locally accepted messages should be received per gain level during auto-gain initialisaion to ensure accurate measurement. | `100000` | +| `AUTOGAIN_FINETUNE_PERIOD` | How long each gain level should be measured during auto-gain fine-tuning, in seconds. | `604800` (7 days) | +| `AUTOGAIN_FINETUNE_MSGS_ACCEPTED` | How many locally accepted messages should be received per gain level during auto-gain fine-tuning to ensure accurate measurement. | `700000` | +| `AUTOGAIN_FINISHED_PERIOD` | How long between the completion of fine-tuning (and ultimately setting a preferred gain), and re-running the entire process. | `31536000` (1 year) | +| `AUTOGAIN_MAX_GAIN_VALUE` | The maximum gain setting in dB that will be used by auto-gain. | `49.6` (max supported by `readsb`) | +| `AUTOGAIN_MIN_GAIN_VALUE` | The minimum gain setting in dB that will be used by auto-gain. | `0.0` (min supported by `readsb`) | +| `AUTOGAIN_PERCENT_STRONG_MESSAGES_MAX` | The maximum percentage of "strong messages" auto-gain will aim for. | `10.0` | +| `AUTOGAIN_PERCENT_STRONG_MESSAGES_MIN` | The minimum percentage of "strong messages" auto-gain will aim for. | `0.5` | +| `AUTOGAIN_SERVICE_PERIOD` | How often the auto-gain system will check results and perform actions, in seconds | `900` (15 minutes) | ### InfluxDB Options These variables control the sending of flight data and dump978 metrics to [InfluxDB](https://docs.influxdata.com/influxdb/) (via a built-in instance of [Telegraf](https://docs.influxdata.com/telegraf/)). -| Variable | Description | Default | -|----------|-------------|---------| -| `INFLUXDBURL` | The full HTTP URL for your InfluxDB instance. Required for both InfluxDB v1 and v2. | Unset | -| `INFLUXDBUSERNAME` | If using authentication, a username for your InfluxDB instance. If not using authentication, leave unset. Not required for InfluxDB v2. | Unset | -| `INFLUXDBPASSWORD` | If using authentication, a password for your InfluxDB instance. If not using authentication, leave unset. Not required for InfluxDB v2. | Unset | -| `INFLUXDB_V2` | Set to a non empty value to enable InfluxDB V2 output. | Unset | -| `INFLUXDB_V2_BUCKET` | Required if `INFLUXDB_V2` is set, bucket must already exist in your InfluxDB v2 instance. | Unset | -| `INFLUXDB_V2_ORG` | Required if `INFLUXDB_V2` is set. | Unset | -| `INFLUXDB_V2_TOKEN` | Required if `INFLUXDB_V2` is set. | Unset | -| `INFLUXDB_SKIP_AIRCRAFT` | Set to any value to skip publishing aircraft data to InfluxDB to minimize bandwidth and database size. | Unset | +| Variable | Description | Default | +| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | ------- | +| `INFLUXDBURL` | The full HTTP URL for your InfluxDB instance. Required for both InfluxDB v1 and v2. | Unset | +| `INFLUXDBUSERNAME` | If using authentication, a username for your InfluxDB instance. If not using authentication, leave unset. Not required for InfluxDB v2. | Unset | +| `INFLUXDBPASSWORD` | If using authentication, a password for your InfluxDB instance. If not using authentication, leave unset. Not required for InfluxDB v2. | Unset | +| `INFLUXDB_V2` | Set to a non empty value to enable InfluxDB V2 output. | Unset | +| `INFLUXDB_V2_BUCKET` | Required if `INFLUXDB_V2` is set, bucket must already exist in your InfluxDB v2 instance. | Unset | +| `INFLUXDB_V2_ORG` | Required if `INFLUXDB_V2` is set. | Unset | +| `INFLUXDB_V2_TOKEN` | Required if `INFLUXDB_V2` is set. | Unset | +| `INFLUXDB_SKIP_AIRCRAFT` | Set to any value to skip publishing aircraft data to InfluxDB to minimize bandwidth and database size. | Unset | ### Prometheus Options These variables control exposing flight data to [Prometheus](https://prometheus.io) (via a built-in instance of [Telegraf](https://docs.influxdata.com/telegraf/)). -| Variable | Description | Default | -|----------|-------------|---------| -| `ENABLE_PROMETHEUS` | Set to any string to enable Prometheus support | Unset | -| `PROMETHEUSPORT` | The port that the prometheus client will listen on | `9273` | -| `PROMETHEUSPATH` | The path that the prometheus client will publish metrics on | `/metrics` | +| Variable | Description | Default | +| ------------------- | ----------------------------------------------------------- | ---------- | +| `ENABLE_PROMETHEUS` | Set to any string to enable Prometheus support | Unset | +| `PROMETHEUSPORT` | The port that the prometheus client will listen on | `9273` | +| `PROMETHEUSPATH` | The path that the prometheus client will publish metrics on | `/metrics` | ## `dump978` Web Pages The container's webserver makes SkyAware978 (and the related `data` directories with `json` statistics files) available at `/skyaware978`. This means, using the port mapping example shown above, that you can access these URLs (among other things): -* [http://my_ip:30980/skyaware978](http://my_ip:30980/skyaware978) -- SkyAware978 map -* [http://my_ip:30980/skyaware978/data/aircraft.json](http://my_ip:30980/skyaware978/data/aircraft.json) -- aircraft.json statistics file -* [http://my_ip:30980/health](http://my_ip:30980/health) -- HealthCheck results (returns `OK` if container is healthy) +- [http://my_ip:30980/skyaware978](http://my_ip:30980/skyaware978) -- SkyAware978 map +- [http://my_ip:30980/skyaware978/data/aircraft.json](http://my_ip:30980/skyaware978/data/aircraft.json) -- aircraft.json statistics file +- [http://my_ip:30980/health](http://my_ip:30980/health) -- HealthCheck results (returns `OK` if container is healthy) ## Auto-Gain system -An automatic gain adjustment system is included in this container, and can be activated by setting the environment variable `DUMP978_SDR_GAIN` to `autogain`. You should also map `/run/autogain` to persistant storage, otherwise the auto-gain system will start over each time the container is restarted. You should also ensure `LAT` and `LON` are set because the script uses the maximum range as a metric for choosing the best gain level. +An automatic gain adjustment system is included in this container, and can be activated by setting the environment variable `DUMP978_SDR_GAIN` to `autogain`. You should also map `/run/autogain` to persistent storage, otherwise the auto-gain system will start over each time the container is restarted. You should also ensure `LAT` and `LON` are set because the script uses the maximum range as a metric for choosing the best gain level. -*Why is this written in bash?* Because I wanted to keep the container size down and not have to install an interpreter like python. I don't know C/Go/Perl or any other languages. +_Why is this written in bash?_ Because I wanted to keep the container size down and not have to install an interpreter like python. I don't know C/Go/Perl or any other languages. Auto-gain will take several weeks to initially (over the period of a week or so) work out feasible maximum and minimum gain levels for your environment. It will then perform a fine-tune process to find the optimal gain level. During each process, gain levels are ranked as follows: -* The range achievable by each gain level -* The signal-to-noise ratio of the receiver +- The range achievable by each gain level +- The signal-to-noise ratio of the receiver The ranking process is done by sorting the gain levels for each statistic from worst to best, then awarding points. 0 points are awarded for the worst gain level, 1 point for the next gain level all the way up to several points for the best gain level (total number of points is the number of gain levels tested). The number of points for each gain level is totalled, and the optimal gain level is the level with the largest number of points. Any gain level with a percentage of "strong signals" outside of `AUTOGAIN_PERCENT_STRONG_MESSAGES_MAX` and `AUTOGAIN_PERCENT_STRONG_MESSAGES_MIN` is discarded. @@ -417,7 +417,7 @@ Run `docker exec rm /run/autogain/*` to remove all existing aut ## Logging -* All processes are logged to the container's stdout, and can be viewed with `docker logs [-f] container`. +- All processes are logged to the container's stdout, and can be viewed with `docker logs [-f] container`. ## Getting help diff --git a/rootfs/etc/s6-overlay/scripts/04-telegraf b/rootfs/etc/s6-overlay/scripts/04-telegraf index 3733ee3..ee1231c 100755 --- a/rootfs/etc/s6-overlay/scripts/04-telegraf +++ b/rootfs/etc/s6-overlay/scripts/04-telegraf @@ -200,7 +200,7 @@ if [[ -z "$INFLUXDB_SKIP_AIRCRAFT" ]]; then ## metric. echo "json_time_key = \"metadata_received_at\"" - ## Time format is the time layout that should be used to interprete the + ## Time format is the time layout that should be used to interpret the ## json_time_key. The time must be `unix`, `unix_ms` or a time in the ## "reference time". echo "json_time_format =\"unix\"" diff --git a/rootfs/etc/s6-overlay/scripts/lighttpd b/rootfs/etc/s6-overlay/scripts/lighttpd index 1751e9d..80530d3 100755 --- a/rootfs/etc/s6-overlay/scripts/lighttpd +++ b/rootfs/etc/s6-overlay/scripts/lighttpd @@ -18,7 +18,7 @@ if [[ -z "$DISABLE_WEBAPP" ]]; then #shellcheck disable=SC2016 s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args s6-setuidgid nobody /usr/sbin/lighttpd \ -f /etc/lighttpd/lighttpd.conf \ - -D + -D # If webapp disabled, sleep forever else diff --git a/rootfs/etc/s6-overlay/scripts/stats b/rootfs/etc/s6-overlay/scripts/stats index 0649991..d5c8e58 100755 --- a/rootfs/etc/s6-overlay/scripts/stats +++ b/rootfs/etc/s6-overlay/scripts/stats @@ -6,4 +6,4 @@ set -eo pipefail sleep 5 # shellcheck disable=SC2016 -s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args python3 -u /scripts/stats.py \ No newline at end of file +s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args python3 -u /scripts/stats.py diff --git a/rootfs/etc/s6-overlay/scripts/telegraf_socat b/rootfs/etc/s6-overlay/scripts/telegraf_socat index 2d26485..e22efeb 100755 --- a/rootfs/etc/s6-overlay/scripts/telegraf_socat +++ b/rootfs/etc/s6-overlay/scripts/telegraf_socat @@ -19,7 +19,7 @@ if [ -z "$INFLUXDB_SKIP_AIRCRAFT" ] && { [ -n "$INFLUXDBURL" ] || [ -n "$ENABLE_ SOCAT_CMD+=("TCP:localhost:33979") # shellcheck disable=SC2016 - s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args "${SOCAT_BIN}" "${SOCAT_CMD[@]}" + s6wrap --quiet --timestamps --prepend="$(basename "$0")" --args "${SOCAT_BIN}" "${SOCAT_CMD[@]}" else sleep infinity diff --git a/rootfs/scripts/autogain.sh b/rootfs/scripts/autogain.sh index a270b92..641c1a6 100755 --- a/rootfs/scripts/autogain.sh +++ b/rootfs/scripts/autogain.sh @@ -58,7 +58,7 @@ AUTOGAIN_STATS_TRACKS_NEW_FILE="/run/autogain/autogain_stats.tracks_new" AUTOGAIN_INTERVAL_FILE="/run/autogain/autogain_interval" # results for init stage AUTOGAIN_RESULTS_FILE="/run/autogain/autogain_results" -# previos stats files - allows stats to persist through container restart +# previous stats files - allows stats to persist through container restart AUTOGAIN_STATS_PREVIOUS_MAX_DISTANCE_FILE="/run/autogain/autogain_stats_current.max_distance" AUTOGAIN_STATS_PREVIOUS_LOCAL_STRONG_MSGS_FILE="/run/autogain/autogain_stats_current.local_strong_msgs" AUTOGAIN_STATS_PREVIOUS_LOCAL_ACCEPTED_MSGS_FILE="/run/autogain/autogain_stats_current.local_accepted" @@ -521,7 +521,7 @@ function autogain_change_into_state () { echo "$AUTOGAIN_MIN_GAIN_VALUE" > "$AUTOGAIN_MIN_GAIN_VALUE_FILE" fi - # If state isnt finished, then set gain to max + # If state isn't finished, then set gain to max if [[ ! "$1" == "finished" ]]; then # We should already be at max gain, check to make sure (maybe user wants to re-run autogain from scratch) diff --git a/rootfs/scripts/stats.py b/rootfs/scripts/stats.py index ed6809a..f912b56 100755 --- a/rootfs/scripts/stats.py +++ b/rootfs/scripts/stats.py @@ -95,7 +95,7 @@ def aggregate(self, new): class CountStatistic(BaseStatistic): - """Used for statistics that count occurences over time""" + """Used for statistics that count occurrences over time""" def __init__(self, name, key=None, test=None): self._key = key @@ -243,7 +243,7 @@ def aggregate(self, new): class UniqueStatistic(BaseStatistic): - """Used for statistics that count unique occurences over time""" + """Used for statistics that count unique occurrences over time""" def __init__(self, name, key=None, test=None): self._key = key @@ -419,7 +419,7 @@ def main(): print("Waiting for /run/stats/stats.json to be created...") while True: try: - with open("/run/stats/stats.json", "r") as f: + with open("/run/stats/stats.json", "r") as _: break except FileNotFoundError: pass @@ -431,7 +431,7 @@ def main(): while True: try: - with open("/run/stats/polar_range.influx", "r") as f: + with open("/run/stats/polar_range.influx", "r") as _: break except FileNotFoundError: pass From 42d6f9f94d4ada1cb73a0d43c8303fd1655e7db1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 07:37:31 -0600 Subject: [PATCH 2/7] chore(deps): Update pre-commit hooks (#76) Co-authored-by: fredclausen --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 34ef282..988fe61 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # lint yaml, line and whitespace - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-yaml - id: end-of-file-fixer @@ -28,7 +28,7 @@ repos: exclude: ^(Dockerfile*) - repo: https://github.com/codespell-project/codespell.git - rev: "v2.2.5" # Use the sha / tag you want to point at + rev: "v2.2.6" # Use the sha / tag you want to point at hooks: - id: codespell types: [text] From 279fc04426d4d5a0c7781dd3ed86a94ce03e26bb Mon Sep 17 00:00:00 2001 From: goofball222 Date: Tue, 17 Oct 2023 09:30:02 -0700 Subject: [PATCH 3/7] Redirect base URL to /skyaware978/ (#77) Update 91-skyaware978.conf to redirect base URL to /skyaware978/ --- rootfs/etc/lighttpd/conf-enabled/91-skyaware978.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/lighttpd/conf-enabled/91-skyaware978.conf b/rootfs/etc/lighttpd/conf-enabled/91-skyaware978.conf index b9512b0..8b314d9 100644 --- a/rootfs/etc/lighttpd/conf-enabled/91-skyaware978.conf +++ b/rootfs/etc/lighttpd/conf-enabled/91-skyaware978.conf @@ -3,7 +3,9 @@ alias.url += ( "/skyaware978/" => "/usr/share/dump978-fa/html/", ) -# redirect the slash-less URL url.redirect += ( + # redirect base URL to /skyaware978/ + "^/$" => "/skyaware978/" + # redirect the slash-less /skyaware978 URL to /skyaware978/ "^/skyaware978$" => "/skyaware978/" ) From 72b71ea02269d2b32aed8634635673d7940e6e5a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 08:38:48 -0600 Subject: [PATCH 4/7] chore(deps): Update pre-commit hooks (#78) Co-authored-by: fredclausen --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 988fe61..7603ee6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: # lint python formatting - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.0 hooks: - id: black From 2e63506341a99b756294b5fb239d31519eef87f0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 08:00:00 -0600 Subject: [PATCH 5/7] chore(deps): Update pre-commit hooks (#79) Co-authored-by: fredclausen --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7603ee6..d8750d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: # lint python formatting - repo: https://github.com/psf/black - rev: 23.10.0 + rev: 23.10.1 hooks: - id: black From 2a03d71c8a42f76a56acf1879460eb09bf94ba48 Mon Sep 17 00:00:00 2001 From: Fred Clausen <43556888+fredclausen@users.noreply.github.com> Date: Thu, 26 Oct 2023 09:16:46 -0600 Subject: [PATCH 6/7] Update interval --- .github/dependabot.yaml | 2 +- .github/workflows/pre-commit-updates.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index d1ee4d1..1b39729 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -5,7 +5,7 @@ updates: - package-ecosystem: "docker" directory: "/" schedule: - interval: daily + interval: weekly assignees: - "fredclausen" diff --git a/.github/workflows/pre-commit-updates.yaml b/.github/workflows/pre-commit-updates.yaml index f075972..abaa955 100644 --- a/.github/workflows/pre-commit-updates.yaml +++ b/.github/workflows/pre-commit-updates.yaml @@ -3,7 +3,7 @@ name: Update pre-commit hooks on: workflow_dispatch: schedule: - - cron: 0 0 * * * + - cron: 0 0 * * 0 jobs: update: From 809b3c717510c273153c40991731715205ea82ca Mon Sep 17 00:00:00 2001 From: Fred Clausen <43556888+fredclausen@users.noreply.github.com> Date: Thu, 26 Oct 2023 10:41:46 -0600 Subject: [PATCH 7/7] update to whitelist --- .github/workflows/deploy.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5c0af0d..ede6b25 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,14 +17,10 @@ on: - main # Don't trigger if it's just a documentation update - paths-ignore: - - "**.md" - - "**.MD" - - "**.yml" - - "LICENSE" - - ".gitattributes" - - ".gitignore" - - ".dockerignore" + paths: + - "rust/**" + - "Dockerfile**" + - "rootfs/**" jobs: workflow-dispatch: