Skip to content

Commit

Permalink
tar1090_disable various (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf authored Feb 15, 2025
1 parent 76d0664 commit 4aac9fa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,8 @@ In order for Telegraf to serve a [Prometheus](https://prometheus.io) endpoint, t

If you want to configure to run with a minimal CPU and RAM profile, and use it _only_ as a SDR decoder but without any mapping or stats/graph websites, then do the following:

- Set the parameter `TAR1090_DISABLE=true`. This will prevent the `nginx` webserver and any websites or associated data collection (collectd, graphs1090, rrd, etc.) to be launched
- Make sure not to use the `dhcr.io/sdr-enthusiasts/docker-adsb-ultrafeeder:telegraf` label as Telegraf adds a LOT of resource use to the container
- Set the parameter `TAR1090_DISABLE=true`. This will prevent the `nginx` webserver and any websites or associated data collection (graphs1090, heatmap, etc.) to be launched
- Make sure not to use the `ghcr.io/sdr-enthusiasts/docker-adsb-ultrafeeder:telegraf` label as Telegraf adds a LOT of resource use to the container

## Offline maps

Expand Down
18 changes: 10 additions & 8 deletions rootfs/etc/s6-overlay/scripts/readsb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ if [ -n "${UUID}" ]; then
fi

READSB_CMD+=("--write-json=/run/readsb")
READSB_CMD+=("--write-state=/var/globe_history")
READSB_CMD+=("--json-trace-interval=15")
# no need to write state when tar1090_disable is used for a minimal setup
if ! chk_enabled "${TAR1090_DISABLE}"; then
READSB_CMD+=("--write-state=/var/globe_history")
fi
READSB_CMD+=("--json-reliable=1")

READSB_CMD+=("--net-ri-port=30001")
Expand All @@ -56,9 +58,11 @@ READSB_CMD+=("--net-json-port=30047")
# READSB_CMD+=(--forward-mlat)
READSB_CMD+=(--net-sbs-in-port=32006)

if chk_enabled "${READSB_ENABLE_HEATMAP:-true}"; then
READSB_CMD+=("--heatmap-dir=/var/globe_history")
READSB_CMD+=("--heatmap=${READSB_HEATMAP_INTERVAL:-15}")
if ! chk_disabled "${READSB_ENABLE_HEATMAP}"; then
if chk_enabled "${READSB_ENABLE_HEATMAP}" || ! chk_enabled "${TAR1090_DISABLE}"; then
READSB_CMD+=("--heatmap-dir=/var/globe_history")
READSB_CMD+=("--heatmap=${READSB_HEATMAP_INTERVAL:-15}")
fi
fi

if chk_enabled "${READSB_ENABLE_TRACES}"; then
Expand Down Expand Up @@ -157,9 +161,7 @@ if [[ -n "$READSB_NET_BEAST_REDUCE_FILTER_DIST" ]]; then
READSB_CMD+=("--net-beast-reduce-filter-dist=$READSB_NET_BEAST_REDUCE_FILTER_DIST")
fi

if [[ -n "$READSB_JSON_TRACE_INTERVAL" ]]; then
READSB_CMD+=("--json-trace-interval=$READSB_JSON_TRACE_INTERVAL")
fi
READSB_CMD+=("--json-trace-interval=${READSB_JSON_TRACE_INTERVAL:-15}")

if [[ -n "$READSB_NET_BEAST_REDUCE_FILTER_ALT" ]]; then
READSB_CMD+=("--net-beast-reduce-filter-alt=$READSB_NET_BEAST_REDUCE_FILTER_ALT")
Expand Down
8 changes: 4 additions & 4 deletions rootfs/etc/s6-overlay/startup.d/07-nginx-configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ else
sed -i 's\error_log .*\error_log /dev/stdout notice;\' /etc/nginx/nginx.conf
fi

if chk_enabled "${TAR1090_DISABLE}"; then
rm -f /etc/nginx/sites-enabled/tar1090
exit 0
fi

# Add in CORS header for tar1090 data/aircraft.json file
# adjust the tar1090 runtime directory to /run/tar1090
Expand All @@ -28,10 +32,6 @@ sed -i \
-e 's#/run/tar1090-webroot/#/run/tar1090/#' \
"/etc/nginx/nginx-tar1090-webroot.conf"

if chk_enabled "${TAR1090_DISABLE}"; then
rm -f /etc/nginx/sites-enabled/tar1090
fi

if chk_enabled "${READSB_ENABLE_API}"; then
# shellcheck disable=SC2016
sed -i -e 's|#sed_placeholder_API_proxy|location /re-api/ {\
Expand Down

0 comments on commit 4aac9fa

Please sign in to comment.