From 123cbfa9579d677b1622633679ae436f59318978 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Thu, 28 Mar 2024 14:57:24 +0100 Subject: [PATCH] tar1090 config: add arbitrary config options --- README.md | 21 +++++++++++++++++++ .../s6-overlay/startup.d/04-tar1090-configure | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/README.md b/README.md index fe39122..29aee1b 100644 --- a/README.md +++ b/README.md @@ -330,6 +330,27 @@ All of the variables below are optional. | `TAR1090_RANGERINGSDISTANCES` | Distances to display range rings, in miles, nautical miles, or km (depending settings value '`TAR1090_DISPLAYUNITS`'). Accepts a comma separated list of numbers (no spaces, no quotes). | `100,150,200,250` | | `TAR1090_RANGERINGSCOLORS` | Colours for each of the range rings specified in `TAR1090_RANGERINGSDISTANCES`. Accepts a comma separated list of hex colour values, each enclosed in single quotes (eg `TAR1090_RANGERINGSCOLORS='#FFFFF','#00000'`). No spaces. | Blank | +#### `tar1090` `config.js` Configuration - Expert + +| Environment Variable | Purpose | Default | +| ---------------------------- | ---------------------------------------------------- | --------- | +| `TAR1090_CONFIG_JS_APPEND` | Append arbitrary javascript code to config.js | Unset | + +- In case a setting is available in tar1090 but not exposed via environment variable for this container +- For a list of possible settings, see +- Incorrect syntax or any capitalization errors will cause the map to not load, you have been warned! +- Example: `TAR1090_CONFIG_JS_APPEND= MapDim=false; nexradOpacity=0.2;` +- In the environment section of a compose file you can generally use multiple lines like this: +```yaml + environment: + ... + - TAR1090_CONFIG_JS_APPEND= + MapDim=false; + nexradOpacity=0.2; + ... +``` + + ### `tar1090` Route Display Configuration | Environment Variable | Purpose | Default | diff --git a/rootfs/etc/s6-overlay/startup.d/04-tar1090-configure b/rootfs/etc/s6-overlay/startup.d/04-tar1090-configure index 1bf4a53..cc2eb55 100755 --- a/rootfs/etc/s6-overlay/startup.d/04-tar1090-configure +++ b/rootfs/etc/s6-overlay/startup.d/04-tar1090-configure @@ -184,6 +184,10 @@ if [[ -n "$TAR1090_ROUTEAPIURL" ]]; then echo "routeApiUrl = ${TAR1090_ROUTEAPIURL};" fi +if [[ -n "$TAR1090_CONFIG_JS_APPEND" ]]; then + echo "$TAR1090_CONFIG_JS_APPEND" +fi + } >> "${TAR1090_INSTALL_DIR}/html-webroot/config.js" if chk_enabled "$TAR1090_LABEL_GROUND_SHOWALL"; then